~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

1 by James Page
Import upstream version 5.6.15
1
'\" t
2
.\"     Title: \fBmysqlhotcopy\fR
3
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
1.2.6 by Marc Deslauriers
Import upstream version 5.6.25
5
.\"      Date: 05/05/2015
1 by James Page
Import upstream version 5.6.15
6
.\"    Manual: MySQL Database System
7
.\"    Source: MySQL 5.6
8
.\"  Language: English
9
.\"
1.2.6 by Marc Deslauriers
Import upstream version 5.6.25
10
.TH "\FBMYSQLHOTCOPY\FR" "1" "05/05/2015" "MySQL 5\&.6" "MySQL Database System"
1 by James Page
Import upstream version 5.6.15
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.\" mysqlhotcopy
31
.\" dumping: databases and tables
32
.\" backups: databases and tables
33
.\" databases: dumping
34
.\" tables: dumping
35
.SH "NAME"
36
mysqlhotcopy \- a database backup program
37
.SH "SYNOPSIS"
38
.HP \w'\fBmysqlhotcopy\ \fR\fB\fIarguments\fR\fR\ 'u
39
\fBmysqlhotcopy \fR\fB\fIarguments\fR\fR
40
.SH "DESCRIPTION"
1.2.4 by Robie Basak
Import upstream version 5.6.23
41
.if n \{\
42
.sp
43
.\}
44
.RS 4
45
.it 1 an-trap
46
.nr an-no-space-flag 1
47
.nr an-break-flag 1
48
.br
49
.ps +1
50
\fBNote\fR
51
.ps -1
52
.br
53
.PP
54
This utility is deprecated in MySQL 5\&.6\&.20 and removed in MySQL 5\&.7
55
.sp .5v
56
.RE
1 by James Page
Import upstream version 5.6.15
57
.PP
58
\fBmysqlhotcopy\fR
59
is a Perl script that was originally written and contributed by Tim Bunce\&. It uses
60
FLUSH TABLES,
61
LOCK TABLES, and
62
cp
63
or
64
scp
65
to make a database backup\&. It is a fast way to make a backup of the database or single tables, but it can be run only on the same machine where the database directories are located\&.
66
\fBmysqlhotcopy\fR
67
works only for backing up
68
MyISAM
69
and
70
ARCHIVE
71
tables\&. It runs on Unix\&.
72
.PP
73
To use
74
\fBmysqlhotcopy\fR, you must have read access to the files for the tables that you are backing up, the
75
SELECT
76
privilege for those tables, the
77
RELOAD
78
privilege (to be able to execute
79
FLUSH TABLES), and the
80
LOCK TABLES
81
privilege (to be able to lock the tables)\&.
82
.sp
83
.if n \{\
84
.RS 4
85
.\}
86
.nf
87
shell> \fBmysqlhotcopy \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fI/path/to/new_directory\fR\fR\fB]\fR
88
.fi
89
.if n \{\
90
.RE
91
.\}
92
.sp
93
.if n \{\
94
.RS 4
95
.\}
96
.nf
97
shell> \fBmysqlhotcopy \fR\fB\fIdb_name_1\fR\fR\fB \&.\&.\&. \fR\fB\fIdb_name_n\fR\fR\fB \fR\fB\fI/path/to/new_directory\fR\fR
98
.fi
99
.if n \{\
100
.RE
101
.\}
102
.PP
103
Back up tables in the given database that match a regular expression:
104
.sp
105
.if n \{\
106
.RS 4
107
.\}
108
.nf
109
shell> \fBmysqlhotcopy \fR\fB\fIdb_name\fR\fR\fB\&./\fR\fB\fIregex\fR\fR\fB/\fR
110
.fi
111
.if n \{\
112
.RE
113
.\}
114
.PP
115
The regular expression for the table name can be negated by prefixing it with a tilde (\(lq~\(rq):
116
.sp
117
.if n \{\
118
.RS 4
119
.\}
120
.nf
121
shell> \fBmysqlhotcopy \fR\fB\fIdb_name\fR\fR\fB\&./~\fR\fB\fIregex\fR\fR\fB/\fR
122
.fi
123
.if n \{\
124
.RE
125
.\}
126
.PP
127
\fBmysqlhotcopy\fR
128
supports the following options, which can be specified on the command line or in the
129
[mysqlhotcopy]
130
and
131
[client]
1.2.4 by Robie Basak
Import upstream version 5.6.23
132
groups of an option file\&. For information about option files used by MySQL programs, see
133
Section\ \&4.2.6, \(lqUsing Option Files\(rq\&.
1 by James Page
Import upstream version 5.6.15
134
.sp
135
.RS 4
136
.ie n \{\
137
\h'-04'\(bu\h'+03'\c
138
.\}
139
.el \{\
140
.sp -1
141
.IP \(bu 2.3
142
.\}
1.2.1 by James Page
Import upstream version 5.6.16
143
.\" mysqlhotcopy: help option
144
.\" help option: mysqlhotcopy
145
\fB\-\-help\fR,
1 by James Page
Import upstream version 5.6.15
146
\fB\-?\fR
147
.sp
148
Display a help message and exit\&.
149
.RE
150
.sp
151
.RS 4
152
.ie n \{\
153
\h'-04'\(bu\h'+03'\c
154
.\}
155
.el \{\
156
.sp -1
157
.IP \(bu 2.3
158
.\}
1.2.1 by James Page
Import upstream version 5.6.16
159
.\" mysqlhotcopy: addtodest option
160
.\" addtodest option: mysqlhotcopy
161
\fB\-\-addtodest\fR
1 by James Page
Import upstream version 5.6.15
162
.sp
163
Do not rename target directory (if it exists); merely add files to it\&.
164
.RE
165
.sp
166
.RS 4
167
.ie n \{\
168
\h'-04'\(bu\h'+03'\c
169
.\}
170
.el \{\
171
.sp -1
172
.IP \(bu 2.3
173
.\}
1.2.1 by James Page
Import upstream version 5.6.16
174
.\" mysqlhotcopy: allowold option
175
.\" allowold option: mysqlhotcopy
176
\fB\-\-allowold\fR
1 by James Page
Import upstream version 5.6.15
177
.sp
178
Do not abort if a target exists; rename it by adding an
179
_old
180
suffix\&.
181
.RE
182
.sp
183
.RS 4
184
.ie n \{\
185
\h'-04'\(bu\h'+03'\c
186
.\}
187
.el \{\
188
.sp -1
189
.IP \(bu 2.3
190
.\}
1.2.1 by James Page
Import upstream version 5.6.16
191
.\" mysqlhotcopy: checkpoint option
192
.\" checkpoint option: mysqlhotcopy
193
\fB\-\-checkpoint=\fR\fB\fIdb_name\fR\fR\fB\&.\fR\fB\fItbl_name\fR\fR
1 by James Page
Import upstream version 5.6.15
194
.sp
195
Insert checkpoint entries into the specified database
196
\fIdb_name\fR
197
and table
198
\fItbl_name\fR\&.
199
.RE
200
.sp
201
.RS 4
202
.ie n \{\
203
\h'-04'\(bu\h'+03'\c
204
.\}
205
.el \{\
206
.sp -1
207
.IP \(bu 2.3
208
.\}
1.2.1 by James Page
Import upstream version 5.6.16
209
.\" mysqlhotcopy: chroot option
210
.\" chroot option: mysqlhotcopy
211
\fB\-\-chroot=\fR\fB\fIpath\fR\fR
1 by James Page
Import upstream version 5.6.15
212
.sp
213
Base directory of the
214
\fBchroot\fR
215
jail in which
216
\fBmysqld\fR
217
operates\&. The
218
\fIpath\fR
219
value should match that of the
220
\fB\-\-chroot\fR
221
option given to
222
\fBmysqld\fR\&.
223
.RE
224
.sp
225
.RS 4
226
.ie n \{\
227
\h'-04'\(bu\h'+03'\c
228
.\}
229
.el \{\
230
.sp -1
231
.IP \(bu 2.3
232
.\}
1.2.1 by James Page
Import upstream version 5.6.16
233
.\" mysqlhotcopy: debug option
234
.\" debug option: mysqlhotcopy
235
\fB\-\-debug\fR
1 by James Page
Import upstream version 5.6.15
236
.sp
237
Enable debug output\&.
238
.RE
239
.sp
240
.RS 4
241
.ie n \{\
242
\h'-04'\(bu\h'+03'\c
243
.\}
244
.el \{\
245
.sp -1
246
.IP \(bu 2.3
247
.\}
1.2.1 by James Page
Import upstream version 5.6.16
248
.\" mysqlhotcopy: dryrun option
249
.\" dryrun option: mysqlhotcopy
250
\fB\-\-dryrun\fR,
1 by James Page
Import upstream version 5.6.15
251
\fB\-n\fR
252
.sp
253
Report actions without performing them\&.
254
.RE
255
.sp
256
.RS 4
257
.ie n \{\
258
\h'-04'\(bu\h'+03'\c
259
.\}
260
.el \{\
261
.sp -1
262
.IP \(bu 2.3
263
.\}
1.2.1 by James Page
Import upstream version 5.6.16
264
.\" mysqlhotcopy: flushlog option
265
.\" flushlog option: mysqlhotcopy
266
\fB\-\-flushlog\fR
1 by James Page
Import upstream version 5.6.15
267
.sp
268
Flush logs after all tables are locked\&.
269
.RE
270
.sp
271
.RS 4
272
.ie n \{\
273
\h'-04'\(bu\h'+03'\c
274
.\}
275
.el \{\
276
.sp -1
277
.IP \(bu 2.3
278
.\}
1.2.1 by James Page
Import upstream version 5.6.16
279
.\" mysqlhotcopy: host option
280
.\" host option: mysqlhotcopy
281
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
1 by James Page
Import upstream version 5.6.15
282
\fB\-h \fR\fB\fIhost_name\fR\fR
283
.sp
284
The host name of the local host to use for making a TCP/IP connection to the local server\&. By default, the connection is made to
285
localhost
286
using a Unix socket file\&.
287
.RE
288
.sp
289
.RS 4
290
.ie n \{\
291
\h'-04'\(bu\h'+03'\c
292
.\}
293
.el \{\
294
.sp -1
295
.IP \(bu 2.3
296
.\}
1.2.1 by James Page
Import upstream version 5.6.16
297
.\" mysqlhotcopy: keepold option
298
.\" keepold option: mysqlhotcopy
299
\fB\-\-keepold\fR
1 by James Page
Import upstream version 5.6.15
300
.sp
301
Do not delete previous (renamed) target when done\&.
302
.RE
303
.sp
304
.RS 4
305
.ie n \{\
306
\h'-04'\(bu\h'+03'\c
307
.\}
308
.el \{\
309
.sp -1
310
.IP \(bu 2.3
311
.\}
1.2.1 by James Page
Import upstream version 5.6.16
312
.\" mysqlhotcopy: method option
313
.\" method option: mysqlhotcopy
314
\fB\-\-method=\fR\fB\fIcommand\fR\fR
1 by James Page
Import upstream version 5.6.15
315
.sp
316
The method for copying files (cp
317
or
318
scp)\&. The default is
319
cp\&.
320
.RE
321
.sp
322
.RS 4
323
.ie n \{\
324
\h'-04'\(bu\h'+03'\c
325
.\}
326
.el \{\
327
.sp -1
328
.IP \(bu 2.3
329
.\}
1.2.1 by James Page
Import upstream version 5.6.16
330
.\" mysqlhotcopy: noindices option
331
.\" noindices option: mysqlhotcopy
332
\fB\-\-noindices\fR
1 by James Page
Import upstream version 5.6.15
333
.sp
334
Do not include full index files for
335
MyISAM
336
tables in the backup\&. This makes the backup smaller and faster\&. The indexes for reloaded tables can be reconstructed later with
337
\fBmyisamchk \-rq\fR\&.
338
.RE
339
.sp
340
.RS 4
341
.ie n \{\
342
\h'-04'\(bu\h'+03'\c
343
.\}
344
.el \{\
345
.sp -1
346
.IP \(bu 2.3
347
.\}
1.2.1 by James Page
Import upstream version 5.6.16
348
.\" mysqlhotcopy: password option
349
.\" password option: mysqlhotcopy
350
\fB\-\-password=\fR\fB\fIpassword\fR\fR,
1 by James Page
Import upstream version 5.6.15
351
\fB\-p\fR\fB\fIpassword\fR\fR
352
.sp
353
The password to use when connecting to the server\&. The password value is not optional for this option, unlike for other MySQL programs\&.
354
.sp
355
Specifying a password on the command line should be considered insecure\&. See
356
Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
357
.RE
358
.sp
359
.RS 4
360
.ie n \{\
361
\h'-04'\(bu\h'+03'\c
362
.\}
363
.el \{\
364
.sp -1
365
.IP \(bu 2.3
366
.\}
1.2.1 by James Page
Import upstream version 5.6.16
367
.\" mysqlhotcopy: port option
368
.\" port option: mysqlhotcopy
369
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
1 by James Page
Import upstream version 5.6.15
370
\fB\-P \fR\fB\fIport_num\fR\fR
371
.sp
372
The TCP/IP port number to use when connecting to the local server\&.
373
.RE
374
.sp
375
.RS 4
376
.ie n \{\
377
\h'-04'\(bu\h'+03'\c
378
.\}
379
.el \{\
380
.sp -1
381
.IP \(bu 2.3
382
.\}
1.2.1 by James Page
Import upstream version 5.6.16
383
.\" mysqlhotcopy: old_server option
384
.\" old_server option: mysqlhotcopy
385
\fB\-\-old_server\fR
1 by James Page
Import upstream version 5.6.15
386
.sp
387
In MySQL 5\&.6,
388
\fBmysqlhotcopy\fR
389
uses
390
FLUSH TABLES \fItbl_list\fR WITH READ LOCK
391
to flush and lock tables\&. Use the
392
\fB\-\-old_server\fR
393
option if the server is older than 5\&.5\&.3, which is when that statement was introduced\&.
394
.RE
395
.sp
396
.RS 4
397
.ie n \{\
398
\h'-04'\(bu\h'+03'\c
399
.\}
400
.el \{\
401
.sp -1
402
.IP \(bu 2.3
403
.\}
1.2.1 by James Page
Import upstream version 5.6.16
404
.\" mysqlhotcopy: quiet option
405
.\" quiet option: mysqlhotcopy
406
\fB\-\-quiet\fR,
1 by James Page
Import upstream version 5.6.15
407
\fB\-q\fR
408
.sp
409
Be silent except for errors\&.
410
.RE
411
.sp
412
.RS 4
413
.ie n \{\
414
\h'-04'\(bu\h'+03'\c
415
.\}
416
.el \{\
417
.sp -1
418
.IP \(bu 2.3
419
.\}
1.2.1 by James Page
Import upstream version 5.6.16
420
.\" mysqlhotcopy: record_log_pos option
421
.\" record_log_pos option: mysqlhotcopy
422
\fB\-\-record_log_pos=\fR\fB\fIdb_name\fR\fR\fB\&.\fR\fB\fItbl_name\fR\fR
1 by James Page
Import upstream version 5.6.15
423
.sp
424
Record master and slave status in the specified database
425
\fIdb_name\fR
426
and table
427
\fItbl_name\fR\&.
428
.RE
429
.sp
430
.RS 4
431
.ie n \{\
432
\h'-04'\(bu\h'+03'\c
433
.\}
434
.el \{\
435
.sp -1
436
.IP \(bu 2.3
437
.\}
1.2.1 by James Page
Import upstream version 5.6.16
438
.\" mysqlhotcopy: regexp option
439
.\" regexp option: mysqlhotcopy
440
\fB\-\-regexp=\fR\fB\fIexpr\fR\fR
1 by James Page
Import upstream version 5.6.15
441
.sp
442
Copy all databases with names that match the given regular expression\&.
443
.RE
444
.sp
445
.RS 4
446
.ie n \{\
447
\h'-04'\(bu\h'+03'\c
448
.\}
449
.el \{\
450
.sp -1
451
.IP \(bu 2.3
452
.\}
1.2.1 by James Page
Import upstream version 5.6.16
453
.\" mysqlhotcopy: resetmaster option
454
.\" resetmaster option: mysqlhotcopy
455
\fB\-\-resetmaster\fR
1 by James Page
Import upstream version 5.6.15
456
.sp
457
Reset the binary log after locking all the tables\&.
458
.RE
459
.sp
460
.RS 4
461
.ie n \{\
462
\h'-04'\(bu\h'+03'\c
463
.\}
464
.el \{\
465
.sp -1
466
.IP \(bu 2.3
467
.\}
1.2.1 by James Page
Import upstream version 5.6.16
468
.\" mysqlhotcopy: resetslave option
469
.\" resetslave option: mysqlhotcopy
470
\fB\-\-resetslave\fR
1 by James Page
Import upstream version 5.6.15
471
.sp
472
Reset the master info repository file or table after locking all the tables\&.
473
.RE
474
.sp
475
.RS 4
476
.ie n \{\
477
\h'-04'\(bu\h'+03'\c
478
.\}
479
.el \{\
480
.sp -1
481
.IP \(bu 2.3
482
.\}
1.2.1 by James Page
Import upstream version 5.6.16
483
.\" mysqlhotcopy: socket option
484
.\" socket option: mysqlhotcopy
485
\fB\-\-socket=\fR\fB\fIpath\fR\fR,
1 by James Page
Import upstream version 5.6.15
486
\fB\-S \fR\fB\fIpath\fR\fR
487
.sp
488
The Unix socket file to use for connections to
489
localhost\&.
490
.RE
491
.sp
492
.RS 4
493
.ie n \{\
494
\h'-04'\(bu\h'+03'\c
495
.\}
496
.el \{\
497
.sp -1
498
.IP \(bu 2.3
499
.\}
1.2.1 by James Page
Import upstream version 5.6.16
500
.\" mysqlhotcopy: suffix option
501
.\" suffix option: mysqlhotcopy
502
\fB\-\-suffix=\fR\fB\fIstr\fR\fR
1 by James Page
Import upstream version 5.6.15
503
.sp
504
The suffix to use for names of copied databases\&.
505
.RE
506
.sp
507
.RS 4
508
.ie n \{\
509
\h'-04'\(bu\h'+03'\c
510
.\}
511
.el \{\
512
.sp -1
513
.IP \(bu 2.3
514
.\}
1.2.1 by James Page
Import upstream version 5.6.16
515
.\" mysqlhotcopy: tmpdir option
516
.\" tmpdir option: mysqlhotcopy
517
\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR
1 by James Page
Import upstream version 5.6.15
518
.sp
519
The temporary directory\&. The default is
520
/tmp\&.
521
.RE
522
.sp
523
.RS 4
524
.ie n \{\
525
\h'-04'\(bu\h'+03'\c
526
.\}
527
.el \{\
528
.sp -1
529
.IP \(bu 2.3
530
.\}
1.2.1 by James Page
Import upstream version 5.6.16
531
.\" mysqlhotcopy: user option
532
.\" user option: mysqlhotcopy
533
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
1 by James Page
Import upstream version 5.6.15
534
\fB\-u \fR\fB\fIuser_name\fR\fR
535
.sp
536
The MySQL user name to use when connecting to the server\&.
537
.RE
538
.PP
539
Use
540
perldoc
541
for additional
542
\fBmysqlhotcopy\fR
543
documentation, including information about the structure of the tables needed for the
544
\fB\-\-checkpoint\fR
545
and
546
\fB\-\-record_log_pos\fR
547
options:
548
.sp
549
.if n \{\
550
.RS 4
551
.\}
552
.nf
553
shell> \fBperldoc mysqlhotcopy\fR
554
.fi
555
.if n \{\
556
.RE
557
.\}
558
.SH "COPYRIGHT"
559
.br
560
.PP
1.2.4 by Robie Basak
Import upstream version 5.6.23
561
Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved.
1 by James Page
Import upstream version 5.6.15
562
.PP
563
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
564
.PP
565
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
566
.PP
567
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
568
.sp
569
.SH "SEE ALSO"
570
For more information, please refer to the MySQL Reference Manual,
571
which may already be installed locally and which is also available
572
online at http://dev.mysql.com/doc/.
573
.SH AUTHOR
574
Oracle Corporation (http://dev.mysql.com/).