Merge lp:~percona-dev/percona-xtrabackup/innobackupex-docs into lp:percona-xtrabackup/2.0
- innobackupex-docs
- Merge into 2.0
Proposed by
Alexey Kopytov
Status: | Merged |
---|---|
Approved by: | Vadim Tkachenko |
Approved revision: | no longer in the source branch. |
Merged at revision: | 240 |
Proposed branch: | lp:~percona-dev/percona-xtrabackup/innobackupex-docs |
Merge into: | lp:percona-xtrabackup/2.0 |
Diff against target: |
542 lines (+223/-251) 1 file modified
innobackupex (+223/-251) |
To merge this branch: | bzr merge lp:~percona-dev/percona-xtrabackup/innobackupex-docs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vadim Tkachenko | Approve | ||
Review via email: mp+54808@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'innobackupex' |
2 | --- innobackupex 2011-03-05 08:12:55 +0000 |
3 | +++ innobackupex 2011-03-25 04:55:20 +0000 |
4 | @@ -3,12 +3,13 @@ |
5 | # A script for making backups of InnoDB and MyISAM tables, indexes and .frm |
6 | # files. |
7 | # |
8 | -# Copyright 2003, 2009 Innobase Oy. All Rights Reserved. |
9 | +# Copyright 2003, 2009 Innobase Oy and Percona Inc 2009-2011. All Rights Reserved. |
10 | # |
11 | |
12 | use strict; |
13 | use Getopt::Long; |
14 | use File::Spec; |
15 | +use Pod::Usage qw(pod2usage); |
16 | use POSIX "strftime"; |
17 | use POSIX ":sys_wait_h"; |
18 | use POSIX "tmpnam"; |
19 | @@ -22,8 +23,8 @@ |
20 | |
21 | # copyright notice |
22 | my $copyright_notice = |
23 | -"InnoDB Backup Utility v${innobackup_version}; Copyright 2003, 2009 Innobase Oy. |
24 | -All Rights Reserved. |
25 | +"InnoDB Backup Utility v${innobackup_version}; Copyright 2003, 2009 Innobase Oy |
26 | +and Percona Inc 2009-2011. All Rights Reserved. |
27 | |
28 | This software is published under |
29 | the GNU GENERAL PUBLIC LICENSE Version 2, June 1991. |
30 | @@ -301,236 +302,9 @@ |
31 | # usage subroutine prints instructions of how to use this program to stdout. |
32 | # |
33 | sub usage { |
34 | - print STDOUT <<EOF; |
35 | - |
36 | -Usage: |
37 | -$innobackup_script [--sleep=MS] [--compress[=LEVEL]] [--include=REGEXP] [--user=NAME] |
38 | - [--password=WORD] [--port=PORT] [--socket=SOCKET] [--no-timestamp] |
39 | - [--ibbackup=IBBACKUP-BINARY] [--slave-info] [--stream=tar] |
40 | - [--scpopt=OPTIONS-FOR-SCP] |
41 | - [--defaults-file=MY.CNF] |
42 | - [--databases=LIST] [--remote-host=HOSTNAME] [--no-lock] BACKUP-ROOT-DIR |
43 | -$innobackup_script --apply-log [--use-memory=MB] [--uncompress] [--defaults-file=MY.CNF] |
44 | - [--export] [--redo-only] [--ibbackup=IBBACKUP-BINARY] BACKUP-DIR |
45 | -$innobackup_script --copy-back [--defaults-file=MY.CNF] BACKUP-DIR |
46 | - |
47 | -The first command line above makes a hot backup of a MySQL database. |
48 | -By default it creates a backup directory (named by the current date |
49 | -and time) in the given backup root directory. With the --no-timestamp |
50 | -option it does not create a time-stamped backup directory, but it puts |
51 | -the backup in the given directory (which must not exist). This |
52 | -command makes a complete backup of all MyISAM and InnoDB tables and |
53 | -indexes in all databases or in all of the databases specified with the |
54 | ---databases option. The created backup contains .frm, .MRG, .MYD, |
55 | -.MYI, .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV, .opt, .par, and InnoDB data and log files. |
56 | -The MY.CNF options file defines the location of the database. This command |
57 | -connects to the MySQL server using mysql client program, and runs |
58 | -ibbackup (InnoDB Hot Backup program) as a child process. |
59 | - |
60 | -The command with --apply-log option prepares a backup for starting a MySQL |
61 | -server on the backup. This command expands InnoDB data files as specified |
62 | -in BACKUP-DIR/backup-my.cnf using BACKUP-DIR/ibbackup_logfile, |
63 | -and creates new InnoDB log files as specified in BACKUP-DIR/backup-my.cnf. |
64 | -The BACKUP-DIR should be a path name of a backup directory created by |
65 | -innobackup. This command runs ibbackup as a child process, but it does not |
66 | -connect to the database server. |
67 | - |
68 | -The command with --copy-back option copies data, index, and log files |
69 | -from backup directory back to their original locations. |
70 | -The MY.CNF options file defines the original location of the database. |
71 | -The BACKUP-DIR is a path name of a backup directory created by innobackup. |
72 | - |
73 | -On success the exit code of innobackup process is 0. A non-zero exit code |
74 | -indicates an error. |
75 | - |
76 | - |
77 | -Options: |
78 | - --help Display this helpscreen and exit. |
79 | - |
80 | - --version Print version information and exit. |
81 | - |
82 | - --defaults-file=[MY.CNF] |
83 | - This option is passed to the xtrabackup child process. |
84 | - It specify which file only read default options from. |
85 | - |
86 | - --apply-log Prepare a backup for starting mysql server on the backup. |
87 | - Expand InnoDB data files as specified in |
88 | - backup-dir/backup-my.cnf, using backup-dir/ibbackup_logfile, |
89 | - and create new log files as specified in |
90 | - backup-dir/backup-my.cnf. |
91 | - |
92 | - --redo-only Options is used with --apply-log. This option forces to skip |
93 | - "rollback" phase and do only "redo". This is necessary to use |
94 | - if backup later will be applied with incremental changes. |
95 | - |
96 | - --copy-back Copy data and index files from backup directory back to |
97 | - their original locations. |
98 | - |
99 | - --remote-host=HOSTNAME |
100 | - If this option is specified, backup files will be created |
101 | - at the remote host by using ssh connection. |
102 | - |
103 | - --stream=[tar|cpio(not implemented)] |
104 | - If this option is specified, backup to STDOUT as specified |
105 | - format. Uses tar4ibd (available in XtraBackup binary). |
106 | - |
107 | - --tmpdir=DIRECTORY |
108 | - When --remote-host or --stream specified, transaction log |
109 | - should be stored temporary. The default value is same to |
110 | - mysqld setting. |
111 | - |
112 | - --use-memory=MB |
113 | - This option is passed to the ibbackup child process. |
114 | - It tells ibbackup that it can use MB megabytes of |
115 | - memory in restoration. |
116 | - Try 'ibbackup --help' for more details on this option. |
117 | - |
118 | - --parallel=NUMBER-OF-THREADS |
119 | - This option is passed to the xtrabackup child process. |
120 | - It specifies the number of threads used by xtrabackup for |
121 | - parallel data transfer. The default value is 1 (i.e. no |
122 | - parallel copying). |
123 | - |
124 | - --throttle=IOS |
125 | - This option is passed to the xtrabackup child process. |
126 | - It limits count of IO operations (pairs of read&write) per |
127 | - second to IOS values (for '--backup') |
128 | - |
129 | - --sleep=MS This option is passed to the ibbackup child process. |
130 | - It instructs the ibbackup program to sleep |
131 | - MS milliseconds after each 1 MB of copied data. |
132 | - You can use this parameter to tune the additional |
133 | - disk i/o load the ibbackup program causes on the computer. |
134 | - Try 'ibbackup --help' for more details on this option. |
135 | - ** it is not supported by xtrabackup ** |
136 | - |
137 | - --compress[=LEVEL] |
138 | - This option is passed to the ibbackup child process. |
139 | - It instructs ibbackup to compress the backup copies of |
140 | - InnoDB data files. Compression level can be |
141 | - specified as an optional argument. Compression level is |
142 | - an integer between 0 and 9: 1 gives fastest compression, |
143 | - 9 gives best compression, and 0 means no compression. |
144 | - If compression level is not given, the default level 1 is used. |
145 | - Try 'ibbackup --help' for more details on this option. |
146 | - ** it is not supported by xtrabackup yet ** |
147 | - |
148 | - --include=REGEXP |
149 | - This option is passed to the ibbackup child process. |
150 | - It tells ibbackup to backup only those per-table data |
151 | - files which match the given regular expression. For |
152 | - each table with a per-table data file a string of the |
153 | - form db_name.table_name is checked against the regular |
154 | - expression. If the regular expression matches the |
155 | - complete string db_name.table_name, the table is |
156 | - included in the backup. The regular expression should |
157 | - be of the POSIX 1003.2 "extended" form. |
158 | - Try 'ibbackup --help' for more details on this option. |
159 | - |
160 | - --databases=LIST |
161 | - This option is used to specify the list of databases that |
162 | - innobackup should backup. The list is of the form |
163 | - "db_name[.table_name] db_name1[.table_name1] ...". |
164 | - If this option is not specified all databases containing |
165 | - MyISAM and InnoDB tables will be backed up. |
166 | - Please make sure that --databases contains all of the |
167 | - innodb databases & tables so that all of the innodb .frm |
168 | - files are also backed up. In case the list is very long, |
169 | - this can be specified in a file and the full path of the |
170 | - file can be specified instead of the list. |
171 | - |
172 | - --tables-file=FILE |
173 | - This option is passed to xtrabackup --tables-file. It |
174 | - filters the tables to backup by a list of database.table |
175 | - names listed in the given file, one per line. |
176 | - |
177 | - --uncompress |
178 | - This option is passed to the ibbackup child process. |
179 | - It tells ibbackup to uncompress compressed InnoDB data files. |
180 | - Try 'ibbackup --help' for more details on this option. |
181 | - ** it is not supported by xtrabackup yet ** |
182 | - |
183 | - --export This option is passed to the xtrabackup child process. |
184 | - It is effective with '--prepare' option. |
185 | - It tells xtrabackup to output "clean" .ibd files and .exp |
186 | - files for 'ALTER TABLE ... IMPORT TABLESPACE' command |
187 | - at innodb_expand_import option enabled XtraDB. |
188 | - |
189 | - --user=NAME This option is passed to the mysql child process. |
190 | - It defines the user for database login if not current user. |
191 | - Try 'mysql --help' for more details on this option. |
192 | - |
193 | - --password=WORD |
194 | - This option is passed to the mysql child process. |
195 | - It defines the password to use when connecting to database. |
196 | - Try 'mysql --help' for more details on this option. |
197 | - |
198 | - --host=HOST This option is passed to the mysql child process. |
199 | - It defines the host to use when connecting to database |
200 | - server with TCP/IP. |
201 | - Try 'mysql --help' for more details on this option. |
202 | - |
203 | - --port=PORT This option is passed to the mysql child process. |
204 | - It defines the port to use when connecting to database |
205 | - server with TCP/IP. |
206 | - Try 'mysql --help' for more details on this option. |
207 | - |
208 | - --safe-slave-backup |
209 | - Stop slave SQL thread and wait to start backup until |
210 | - Slave_open_temp_tables in SHOW STATUS is zero. If |
211 | - there are no open temp tables, the backup will take place, |
212 | - else the SQL thread will be started and stopped until there |
213 | - are no open temp tables. The backup will fail if |
214 | - Slave_open_temp_tables does not become zero after |
215 | - --safe-slave-backup-timeout seconds. The slave SQL thread |
216 | - will be restarted when the backup finishes. |
217 | - |
218 | - --safe-slave-backup-timeout |
219 | - How many seconds --safe-slave-backup should wait for |
220 | - Slave_open_temp_tables to become zero. (default 300) |
221 | - |
222 | - --slave-info |
223 | - This option is useful when backing up a replication |
224 | - slave server. It prints the binary log position and |
225 | - name of the binary log file of the master server. |
226 | - It also writes this information to the 'ibbackup_slave_info' |
227 | - file as a 'CHANGE MASTER' command. A new slave for this |
228 | - master can be set up by starting a slave server on this |
229 | - backup and issuing a 'CHANGE MASTER' command with the binary |
230 | - log position saved in the 'ibbackup_slave_info' file. |
231 | - |
232 | - --socket=SOCKET |
233 | - This option is passed to the mysql child process. |
234 | - It defines the socket to use when connecting to local database |
235 | - server with UNIX domain socket. |
236 | - Try 'mysql --help' for more details on this option. |
237 | - |
238 | - --no-timestamp |
239 | - This option prevents the creation of a new backup |
240 | - directory (named by the current date and time) under |
241 | - the backup root directory. Instead, the backup is put |
242 | - in the directory given on the command-line (in the |
243 | - place of BACKUP-ROOT-DIR argument). The directory must not |
244 | - exist, because innobackup creates it while making a backup. |
245 | - |
246 | - --ibbackup=IBBACKUP-BINARY |
247 | - Use this option to specify which ibbackup (InnoDB Hot |
248 | - Backup) binary should be used. IBBACKUP-BINARY |
249 | - should be the command used to run ibbackup. This can |
250 | - be useful if ibbackup is not in your search path or |
251 | - working directory. If this option is not given, |
252 | - ibbackup is run with command "xtrabackup". |
253 | - --no-lock |
254 | - Use this option to disable table lock with |
255 | - FLUSH TABLES WITH READ LOCK. use it only while ALL your |
256 | - tables are InnoDB and you DO NOT CARE about binary log |
257 | - position of backup. |
258 | - |
259 | - --scpopt=SCP-OPTIONS |
260 | - Use this option to specify the command line options |
261 | - to pass to scp. The default options are '-Cp -c arcfour'. |
262 | - |
263 | -EOF |
264 | + my $msg = shift || ''; |
265 | + pod2usage({ -msg => $msg, -verbose => 1}); |
266 | + return 0; |
267 | } |
268 | |
269 | |
270 | @@ -1769,23 +1543,11 @@ |
271 | "Your perl is too old! Innobackup requires\n"; |
272 | print STDERR "$prefix Warning: perl $required_version or newer!\n"; |
273 | } |
274 | - } else { |
275 | - $perl_version = chr($required_perl_version[0]) |
276 | - . chr($required_perl_version[1]) |
277 | - . chr($required_perl_version[2]); |
278 | - if ($^V lt $perl_version) { |
279 | - my $version = chr(48 + $required_perl_version[0]) |
280 | - . "." . chr(48 + $required_perl_version[1]) |
281 | - . "." . chr(48 + $required_perl_version[2]); |
282 | - print STDERR "$prefix Warning: " . |
283 | - "Your perl is too old! Innobackup requires\n"; |
284 | - print STDERR "$prefix Warning: perl $version or newer!\n"; |
285 | - } |
286 | } |
287 | |
288 | if (@ARGV == 0) { |
289 | # no command line arguments |
290 | - usage(); |
291 | + print STDERR "$prefix You must specify the backup directory.\n"; |
292 | exit(1); |
293 | } |
294 | |
295 | @@ -1799,8 +1561,8 @@ |
296 | 'redo-only' => \$option_redo_only, |
297 | 'copy-back' => \$option_copy_back, |
298 | 'include=s' => \$option_include, |
299 | - 'databases=s' => \$option_databases, |
300 | - 'tables-file=s', => \$option_tables_file, |
301 | + 'databases=s' => \$option_databases, |
302 | + 'tables-file=s', => \$option_tables_file, |
303 | 'use-memory=s' => \$option_use_memory, |
304 | 'uncompress' => \$option_uncompress, |
305 | 'export' => \$option_export, |
306 | @@ -1832,7 +1594,6 @@ |
307 | if (!$rcode) { |
308 | # failed to read options |
309 | print STDERR "$prefix Bad command line arguments\n"; |
310 | - usage(); |
311 | exit(1); |
312 | } |
313 | if ($option_help) { |
314 | @@ -1858,11 +1619,9 @@ |
315 | |
316 | if (@ARGV < 1) { |
317 | print STDERR "$prefix Missing command line argument\n"; |
318 | - usage(); |
319 | exit(1); |
320 | } elsif (@ARGV > 1) { |
321 | print STDERR "$prefix Too many command line arguments\n"; |
322 | - usage(); |
323 | exit(1); |
324 | } |
325 | |
326 | @@ -2569,3 +2328,216 @@ |
327 | my ($n) = $lines[$last_value] =~ m/(\d+)/; |
328 | return $n; |
329 | } |
330 | + |
331 | +=pod |
332 | + |
333 | +=head1 NAME |
334 | + |
335 | +innobackupex - Non-blocking backup tool for InnoDB, XtraDB and HailDB databases |
336 | + |
337 | +=head1 SYNOPOSIS |
338 | + |
339 | +innobackupex [--compress[=LEVEL]] [--include=REGEXP] [--user=NAME] |
340 | + [--password=WORD] [--port=PORT] [--socket=SOCKET] |
341 | + [--no-timestamp] [--ibbackup-binary=IBBACKUP-BINARY] |
342 | + [--slave-info] [--stream=tar] [--force-tar] |
343 | + [--scpopt=OPTIONS-FOR-SCP] [--defaults-file=MY.CNF] |
344 | + [--databases=LIST] [--remote-host=HOSTNAME] [--no-lock] |
345 | + [--tmpdir=DIRECTORY] [--tables-file=FILE] |
346 | + [--incremental] [--incremental-basedir] |
347 | + [--incremental-dir] [--incremental-lsn] |
348 | + BACKUP-ROOT-DIR |
349 | + |
350 | +innobackupex --apply-log [--use-memory=MB] [--uncompress] |
351 | + [--defaults-file=MY.CNF] |
352 | + [--export] [--redo-only] [--ibbackup=IBBACKUP-BINARY] |
353 | + BACKUP-DIR |
354 | + |
355 | +innobackupex --copy-back [--defaults-file=MY.CNF] BACKUP-DIR |
356 | + |
357 | +=head1 DESCRIPTION |
358 | + |
359 | +The first command line above makes a hot backup of a MySQL database. |
360 | +By default it creates a backup directory (named by the current date |
361 | +and time) in the given backup root directory. With the --no-timestamp |
362 | +option it does not create a time-stamped backup directory, but it puts |
363 | +the backup in the given directory (which must not exist). This |
364 | +command makes a complete backup of all MyISAM and InnoDB tables and |
365 | +indexes in all databases or in all of the databases specified with the |
366 | +--databases option. The created backup contains .frm, .MRG, .MYD, |
367 | +.MYI, .TRG, .TRN, .ARM, .ARZ, .CSM, CSV, .opt, .par, and InnoDB data and log files. |
368 | +The MY.CNF options file defines the location of the database. This command |
369 | +connects to the MySQL server using the mysql client program, and runs |
370 | +xtrabackup as a child process. |
371 | + |
372 | +The --apply-log command prepares a backup for starting a MySQL |
373 | +server on the backup. This command recovers InnoDB data files as specified |
374 | +in BACKUP-DIR/backup-my.cnf using BACKUP-DIR/xtrabackup_logfile, |
375 | +and creates new InnoDB log files as specified in BACKUP-DIR/backup-my.cnf. |
376 | +The BACKUP-DIR should be the path to a backup directory created by |
377 | +xtrabackup. This command runs xtrabackup as a child process, but it does not |
378 | +connect to the database server. |
379 | + |
380 | +The --copy-back command copies data, index, and log files |
381 | +from the backup directory back to their original locations. |
382 | +The MY.CNF options file defines the original location of the database. |
383 | +The BACKUP-DIR is the path to a backup directory created by xtrabackup. |
384 | + |
385 | +On success the exit code innobackupex is 0. A non-zero exit code |
386 | +indicates an error. |
387 | + |
388 | + |
389 | +=head1 OPTIONS |
390 | + |
391 | +=over |
392 | + |
393 | +=item --apply-log |
394 | + |
395 | +Prepare a backup in BACKUP-DIR by applying the transaction log file named "xtrabackup_logfile" located in the same directory. Also, create new transaction logs. The InnoDB configuration is read from the file "backup-my.cnf". |
396 | + |
397 | +=item --copy-back |
398 | + |
399 | +Copy all the files in a previously made backup from the backup directory to their original locations. |
400 | + |
401 | +=item --databases=LIST |
402 | + |
403 | +This option specifies the list of databases that innobackupex should back up. The option accepts a string argument. The list is of the form "databasename1[.table_name1] databasename2[.table_name2] . . .". If this option is not specified, all databases containing MyISAM and InnoDB tables will be backed up. Please make sure that --databases contains all of the InnoDB databases and tables, so that all of the innodb.frm files are also backed up. In case the list is very long, this can be specified in a file, and the full path of the file can be specified instead of the list. (See option --tables-file.) |
404 | + |
405 | +=item --defaults-file=[MY.CNF] |
406 | + |
407 | +This option specifies what file to read the default MySQL options from. The option accepts a string argument. It is also passed directly to xtrabackup's --defaults-file option. See the xtrabackup documentation for details. |
408 | + |
409 | +=item --export |
410 | + |
411 | +This option is passed directly to xtrabackup's --export option. It enables exporting individual tables for import into another server. See the xtrabackup documentation for details. |
412 | + |
413 | +=item --extra-lsndir=DIRECTORY |
414 | + |
415 | +This option specifies the directory in which to save an extra copy of the "xtrabackup_checkpoints" file. The option accepts a string argument. It is passed directly to xtrabackup's --extra-lsndir option. See the xtrabackup documentation for details. |
416 | + |
417 | +=item --force-tar |
418 | + |
419 | +This option forces the use of tar when creating a streamed backup, rather than tar4ibd, which is the default. |
420 | + |
421 | +=item --help |
422 | + |
423 | +This option displays a help screen and exits. |
424 | + |
425 | +=item --host=HOST |
426 | + |
427 | +This option specifies the host to use when connecting to the database server with TCP/IP. The option accepts a string argument. It is passed to the mysql child process without alteration. See mysql --help for details. |
428 | + |
429 | +=item --ibbackup-binary=IBBACKUP-BINARY |
430 | + |
431 | +This option specifies which xtrabackup binary should be used. The option accepts a string argument. IBBACKUP-BINARY should be the command used to run XtraBackup. The option can be useful if the xtrabackup binary is not in your search path or working directory. If this option is not specified, innobackupex attempts to determine the binary to use automatically. By default, "xtrabackup" is the command used. However, when option --copy-back is specified, "xtrabackup_51" is the command used. And when option --apply-log is specified, the binary is used whose name is in the file "xtrabackup_binary" in the backup directory, if that file exists. |
432 | + |
433 | +=item --include=REGEXP |
434 | + |
435 | +This option is a regular expression to be matched against table names in databasename.tablename format. It is passed directly to xtrabackup's --tables option. See the xtrabackup documentation for details. |
436 | + |
437 | +=item --incremental |
438 | + |
439 | +This option tells xtrabackup to create an incremental backup, rather than a full one. It is passed to the xtrabackup child process. When this option is specified, either --incremental-lsn or --incremental-basedir can also be given. If neither option is given, option --incremental-basedir is passed to xtrabackup by default, set to the first timestamped backup directory in the backup base directory. |
440 | + |
441 | +=item --incremental-basedir=DIRECTORY |
442 | + |
443 | +This option specifies the directory containing the full backup that is the base dataset for the incremental backup. The option accepts a string argument. It is used with the --incremental option. |
444 | + |
445 | +=item --incremental-dir=DIRECTORY |
446 | + |
447 | +This option specifies the directory where the incremental backup will be combined with the full backup to make a new full backup. The option accepts a string argument. It is used with the --incremental option. |
448 | + |
449 | +=item --incremental-lsn |
450 | + |
451 | +This option specifies the log sequence number (LSN) to use for the incremental backup. The option accepts a string argument. It is used with the --incremental option. It is used instead of specifying --incremental-basedir. For databases created by MySQL and Percona Server 5.0-series versions, specify the LSN as two 32-bit integers in high:low format. For databases created in 5.1 and later, specify the LSN as a single 64-bit integer. |
452 | + |
453 | +=item --no-lock |
454 | + |
455 | +Use this option to disable table lock with "FLUSH TABLES WITH READ LOCK". Use it only if ALL your tables are InnoDB and you DO NOT CARE about the binary log position of the backup. |
456 | + |
457 | +=item --no-timestamp |
458 | + |
459 | +This option prevents creation of a time-stamped subdirectory of the BACKUP-ROOT-DIR given on the command line. When it is specified, the backup is done in BACKUP-ROOT-DIR instead. |
460 | + |
461 | +=item --parallel=NUMBER-OF-THREADS |
462 | + |
463 | +This option specifies the number of threads the xtrabackup child process should use to back up files concurrently. The option accepts an integer argument. It is passed directly to xtrabackup's --parallel option. See the xtrabackup documentation for details. |
464 | + |
465 | + |
466 | +=item --password=WORD |
467 | + |
468 | +This option specifies the password to use when connecting to the database. It accepts a string argument. It is passed to the mysql child process without alteration. See mysql --help for details. |
469 | + |
470 | +=item --port=PORT |
471 | + |
472 | +This option specifies the port to use when connecting to the database server with TCP/IP. The option accepts a string argument. It is passed to the mysql child process. It is passed to the mysql child process without alteration. See mysql --help for details. |
473 | + |
474 | +=item --redo-only |
475 | + |
476 | +This option is passed directly to xtrabackup's --apply-log-only option. This forces xtrabackup to skip the "rollback" phase and do a "redo" only. This is necessary if the backup will have incremental changes applied to it later. See the xtrabackup documentation for details. |
477 | + |
478 | +=item --remote-host=HOSTNAME |
479 | + |
480 | +This option specifies the remote host on which the backup files will be created, by using an ssh connection. The option accepts a string argument. |
481 | + |
482 | +=item --safe-slave-backup |
483 | + |
484 | +Stop slave SQL thread and wait to start backup until Slave_open_temp_tables in "SHOW STATUS" is zero. If there are no open temporary tables, the backup will take place, otherwise the SQL thread will be started and stopped until there are no open temporary tables. The backup will fail if Slave_open_temp_tables does not become zero after --safe-slave-backup-timeout seconds. The slave SQL thread will be restarted when the backup finishes. |
485 | + |
486 | +=item --safe-slave-backup-timeout |
487 | + |
488 | +How many seconds --safe-slave-backup should wait for Slave_open_temp_tables to become zero. (default 300) |
489 | + |
490 | +=item --scpopt=SCP-OPTIONS |
491 | + |
492 | +This option specifies the command line options to pass to scp when the option --remost-host is specified. The option accepts a string argument. If the option is not specified, the default options are "-Cp -c arcfour". |
493 | + |
494 | +=item --slave-info |
495 | + |
496 | +This option is useful when backing up a replication slave server. It prints the binary log position and name of the master server. It also writes this information to the "xtrabackup_slave_info" file as a "CHANGE MASTER" command. A new slave for this master can be set up by starting a slave server on this backup and issuing a "CHANGE MASTER" command with the binary log position saved in the "xtrabackup_slave_info" file. |
497 | + |
498 | +=item --socket=SOCKET |
499 | + |
500 | +This option specifies the socket to use when connecting to the local database server with a UNIX domain socket. The option accepts a string argument. It is passed to the mysql child process without alteration. See mysql --help for details. |
501 | + |
502 | +=item --stream=[tar|. . .] |
503 | + |
504 | +This option specifies the format in which to do the streamed backup. The option accepts a string argument. The backup will be done to STDOUT in the specified format. Currently, the only supported format is tar. Uses tar4ibd, which is available in XtraBackup distributions. |
505 | + |
506 | +=item --tables-file=FILE |
507 | + |
508 | +This option specifies the file in which there are a list of names of the form database. The option accepts a string argument.table, one per line. The option is passed directly to xtrabackup's --tables-file option. |
509 | + |
510 | +=item --throttle=IOS |
511 | + |
512 | +This option specifies a number of I/O operations (pairs of read+write) per second. It accepts an integer argument. It is passed directly to xtrabackup's --throttle option. |
513 | + |
514 | +=item --tmpdir=DIRECTORY |
515 | + |
516 | +This option specifies the location where a temporary file will be stored. The option accepts a string argument. It should be used when --remote-host or --stream is specified. For these options, the transaction log will first be stored to a temporary file, before streaming or copying to a remote host. This option specifies the location where that temporary file will be stored. If the option is not specifed, the default is to use the value of tmpdir read from the server configuration. |
517 | + |
518 | +=item --use-memory=MB |
519 | + |
520 | +This option specifies the amount of memory in megabytes for xtrabackup to use for crash recovery while preparing a backup. The option accepts a string argument. It is used only with the option --apply-log. It is passed directly to xtrabackup's --use-memory option. See the xtrabackup documentation for details. |
521 | + |
522 | +=item --user=NAME |
523 | + |
524 | +This option specifies the MySQL username used when connecting to the server, if that's not the current user. The option accepts a string argument. It is passed to the mysql child process without alteration. See mysql --help for details. |
525 | + |
526 | +=item --version |
527 | + |
528 | +This option displays the xtrabackup version and copyright notice and then exits. |
529 | + |
530 | +=back |
531 | + |
532 | +=head1 BUGS |
533 | + |
534 | +Bugs can be reported on Launchpad: https://bugs.launchpad.net/percona-xtrabackup/+filebug |
535 | + |
536 | +=head1 COPYRIGHT |
537 | + |
538 | +InnoDB Backup Utility Copyright 2003, 2009 Innobase Oy and Percona, Inc 2009-2011. All Rights Reserved. |
539 | + |
540 | +This software is published under the GNU GENERAL PUBLIC LICENSE Version 2, June 1991. |
541 | + |
542 | +=cut |
good for me