.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MYSQL-PARALLEL-DUMP 1" .TH MYSQL-PARALLEL-DUMP 1 "2007-10-15" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" mysql\-parallel\-dump \- Dump sets of MySQL tables in parallel. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& mysql-parallel-dump \& mysql-parallel-dump --tab --basedir /path/to/backups/ \& mysql-parallel-dump --sets order,profile,session --settable meta.backupset .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" MySQL Parallel Dump connects to a MySQL server, finds database and table names, and dumps them in parallel for speed. It can be used in several pre-packaged ways, or as a generic wrapper to call some program in parallel, passing it parameters for each table. It supports backup sets and dumping only tables that have changed since the last dump. .PP To dump all tables to gzipped files in the current directory, each database with its own directory, with a global read lock, flushing and recording binary log positions, each table in a single file: .PP .Vb 1 \& mysql-parallel-dump .Ve .PP To dump tables elsewhere: .PP .Vb 1 \& mysql-parallel-dump --basedir /path/to/elsewhere .Ve .PP To dump to tab-separated files with \f(CW\*(C`SELECT INTO OUTFILE\*(C'\fR, each table with separate data and \s-1SQL\s0 files: .PP .Vb 1 \& mysql-parallel-dump --tab .Ve .PP To dump one or more backup sets (see \*(L"\s-1BACKUP\s0 \s-1SETS\s0\*(R"): .PP .Vb 1 \& mysql-parallel-dump --sets set1,set2,set3 --settable meta.backupset .Ve .PP To \*(L"write your own command line,\*(R" use \f(CW\*(C`\-\-\*(C'\fR to indicate where the arguments for MySQL Parallel Dump stop and where the arguments for \f(CW\*(C`mysqldump\*(C'\fR (or any other program) begin. The following example shows \f(CW\*(C`mysqldump\*(C'\fR, and aside from simpler options to \f(CW\*(C`mysqldump\*(C'\fR, is basically what happens when you specify no arguments at all: .PP .Vb 2 \& mysql-parallel-dump -- mysqldump --skip-lock-tables '%D' '%N' \e \& \e| gzip --fast -c - \e> '%D.%N.gz' .Ve .PP The \f(CW\*(C`%\*(C'\fR modifiers are macros (see \*(L"\s-1MACROS\s0\*(R"). The \f(CW\*(C`\-\-skip\-lock\-tables\*(C'\fR argument is very important in that last example, because otherwise both MySQL Parallel Dump and \f(CW\*(C`mysqldump\*(C'\fR will lock tables, so \f(CW\*(C`mysqldump\*(C'\fR will hang, waiting for the locks. Notice the shell metacharacters \f(CW\*(C`|\*(C'\fR and \f(CW\*(C`>\*(C'\fR are escaped so the shell won't interpret them, and they'll get passed through to the generated command\-line. .PP There's no reason you can't use MySQL Parallel Dump to do other tasks in parallel, such as \f(CW\*(C`OPTIMIZE TABLE\*(C'\fR: .PP .Vb 1 \& mysql-parallel-dump --noflushlock --nolocktables -- mysqlcheck --optimize '%D' '%N' .Ve .PP When you use built-in defaults, MySQL Parallel Dump will relay these arguments on to every forked copy of \f(CW\*(C`mysqldump\*(C'\fR: \*(L"\-\-defaults\-file\*(R", \*(L"\-\-host\*(R", \&\*(L"\-\-port\*(R", \*(L"\-\-socket\*(R", \*(L"\-\-user\*(R", \*(L"\-\-password\*(R". If you write your own command\-line, you will need to specify them manually. .PP MySQL Parallel Dump does \fInot\fR back up your entire database. It dumps tables and data \fIonly\fR. It does not dump view definitions or stored routines. However, if you dump the \f(CW\*(C`mysql\*(C'\fR database, you'll be dumping the stored routines anyway. .PP Exit status is 0 if everything went well, 1 if any chunks failed, and any other value indicates an internal error. .PP MySQL Parallel Dump doesn't clean out any destination directories before dumping into them. You can move away the old destination, then remove it after a successful dump, with a shell script like the following: .PP .Vb 11 \& #!/bin/sh \& CNT=`ls | grep -c old`; \& if [ -d default ]; then mv default default.old.$CNT; \& mysql-parallel-dump \& if [ $? != 0 ] \& then \& echo "There were errors, not purging old sets." \& else \& echo "No errors during dump, purging old sets." \& rm -rf default.old.* \& fi .Ve .SH "BACKUP SETS" .IX Header "BACKUP SETS" Backup sets are groups of logically related tables you want to backup together. You specify a set by inserting the table names into a table in the MySQL server from which you're dumping, and then naming it in the \*(L"\-\-sets\*(R" option. MySQL Parallel Dump always works a set at a time; if you don't specify a set, it auto-discovers tables, filters them with the various command-line options (\*(L"\-\-databases\*(R", etc) and considers them the default set. .PP The table that stores backup sets should have at least these columns: setname, priority, db, tbl. The following is a suggested table structure: .PP .Vb 9 \& CREATE TABLE backupset ( \& setname CHAR(10) NOT NULL, \& priority INT NOT NULL DEFAULT 0, \& db CHAR(64) NOT NULL, \& tbl CHAR(64) NOT NULL, \& ts TIMESTAMP NOT NULL, \& PRIMARY KEY(setname, db, tbl), \& KEY(setname, priority, db, tbl) \& ); .Ve .PP Entries are ordered by priority, db, and tbl. Priority 0 tables are dumped first, not last. If it looks like tables are dumped in the wrong order, it's probably because they're being dumped asynchronously. The output is printed when the dump finishes, not when it starts. .PP If you specify \*(L"\-\-age\*(R", MySQL Parallel Dump expects the \f(CW\*(C`ts\*(C'\fR column to exist, and will update the column to the current date and time when it successfully dumps a table. .PP Don't use \f(CW\*(C`default\*(C'\fR as a set name. It is used when you don't specify any sets and when you want all tables not explicitly assigned to a set to be dumped (see \*(L"\-\-defaultset\*(R"). .PP Set names may contain only lowercase letters, numbers, and underscores. .SH "CHUNKS" .IX Header "CHUNKS" MySQL Parallel Dump can break your tables into chunks when dumping, and put approximately the amount of data you specify into each chunk. This is useful to avoid enormous files for restoration, which can not only take a long time but may be a lot of extra work for transactional storage engines like InnoDB. It can create a huge rollback segment in your tablespace. .PP To dump in chunks, specify the \*(L"\-\-chunksize\*(R" option. This option is an integer with an optional suffix. Without the suffix, it's the number of rows you want in each chunk. With the suffix, it's the approximate size of the data. .PP MySQL Parallel Dump tries to use index statistics to calculate where the boundaries between chunks should be. If the values are not evenly distributed, some chunks can have a lot of rows, and others may have very few or even none. Some chunks can exceed the size you want. .PP When you specify the size with a suffix, the allowed suffixes are k, M and G, for kibibytes, mebibytes, and gibibytes, respectively. MySQL Parallel Dump doesn't know anything about data size. It asks MySQL (via \f(CW\*(C`SHOW TABLE STATUS\*(C'\fR) how long an average row is in the table, and converts your option to a number of rows. .PP Not all tables can be broken into chunks. MySQL Parallel Dump looks for an index whose leading column is numeric (integers, real numbers, and date and time types). It prefers the primary key if its first column is chunk\-able. Otherwise it chooses the first chunk-able column in the table. .PP Generating a series of \f(CW\*(C`WHERE\*(C'\fR clauses to divide a table into evenly-sized chunks is difficult. If you have any ideas on how to improve the algorithm, please write to the author (see \*(L"\s-1BUGS\s0\*(R"). .SH "MACROS" .IX Header "MACROS" MySQL Parallel Dump can insert \f(CW\*(C`%\*(C'\fR variables into arguments. The available macros are as follows: .PP .Vb 7 \& MACRO MEANING \& ===== ================= \& %S The backup set \& %D The database name \& %N The table name \& %C The chunk number \& %W The WHERE clause .Ve .PP You can place a number between the \f(CW\*(C`%\*(C'\fR and the letter. The macro replacement then assumes it's a digit and pads it with leading zeroes (in practice, this is only useful for \f(CW%C\fR). .SH "OUTPUT" .IX Header "OUTPUT" Output depends on verbosity. When \*(L"\-\-test\*(R" is given, output includes commands that would be executed. .PP When \*(L"\-\-verbose\*(R" is 0, there is normally no output unless there's an error. .PP When \*(L"\-\-verbose\*(R" is 1, there is one line of output for each backup set, showing the set, how many tables and chunks were dumped with what status, how much time elapsed, and how much time the parallel dump jobs added up to. A final line shows sums for all sets, unless there is only one set. .PP When \*(L"\-\-verbose\*(R" is 2, there is also one line of output for each table. Each line is printed when a forked \*(L"child\*(R" process ends and is removed from the list of children. The output shows the backup set, database, table, seconds spent dumping, the exit status of the forked dump process, and number of current processes (including the one just reaped; so this typically shows \&\*(L"how many are running in parallel\*(R"). A status of 0 indicates success: .PP .Vb 4 \& SET DATABASE TABLE TIME STATUS THREADS \& default mysql db 0 0 4 \& default mysql columns_priv 0 0 4 \& default mysql help_category 0 0 3 .Ve .SH "SPEED OF PARALLEL DUMPS" .IX Header "SPEED OF PARALLEL DUMPS" How much faster is it to dump in parallel? That depends on your hardware and data. You may be able dump files twice as fast, or more if you have lots of disks and CPUs. Here are some user-contributed figures. .PP The following table is for a 3.6GHz Xeon machine with 4 processors and a \s-1RAID\-10\s0 array of 15k disks, directly attached to the server with a fibre channel. Most of the space is in one huge table that wasn't dumped in parallel: .PP .Vb 4 \& COMMAND SIZE TIME \& -------------------------- ----- ---- \& mysql-parallel-dump 1.4GB 269 \& mysqldump 1.4GB 345 .Ve .PP On the same machine, in a database with lots of roughly equal-sized tables: .PP .Vb 4 \& COMMAND SIZE TIME \& -------------------------- ----- ---- \& mysql-parallel-dump 117MB 7 \& mysqldump 117MB 37 .Ve .PP It doesn't always work that well. A dual 2.80GHz Xeon server with a \s-1RAID\-5\s0 array of three 7200RPM \s-1SATA\s0 disk drives running MySQL 5.0.38 on GNU/Linux achieved the following dump times: .PP .Vb 4 \& COMMAND SIZE TIME \& -------------------------- ----- ---- \& mysql-parallel-dump 3.0GB 2596 \& mysqldump | gzip --fast 3.0GB 3195 .Ve .PP While dumping two threads in parallel, this machine was at an average of 74% \&\s-1CPU\s0 utilization and 12% I/O wait. This machine doesn't have enough disks and CPUs to do that many things at once, so it's not going to speed up much. .PP Dumping lots of tiny tables by forking of lots of \f(CW\*(C`mysqldump\*(C'\fR processes isn't usually much faster, because of the overhead of starting \f(CW\*(C`mysqldump\*(C'\fR, connecting, inspecting the table, and dumping it. Note that tab-separated dumps are typically much faster and don't suffer as much from the effects of many tiny tables, because they're not done via \f(CW\*(C`mysqldump\*(C'\fR. .SH "OPTIONS" .IX Header "OPTIONS" Some options can be disabled by prefixing them with \f(CW\*(C`\-\-no\*(C'\fR, such as \&\f(CW\*(C`\-\-no\-gzip\*(C'\fR. .IP "\-\-age" 4 .IX Item "--age" Specifies how old a table must be modified before MySQL Parallel Dump will consider it. The argument is a number with a suffix (s=seconds, m=minutes, h=hours, d=days). .Sp When \*(L"\-\-sets\*(R" is not specified, MySQL Parallel Dump uses \f(CW\*(C`SHOW TABLE STATUS\*(C'\fR instead of \f(CW\*(C`SHOW TABLES\*(C'\fR to get a list of tables in each database, and compares the time to the \f(CW\*(C`Update_time\*(C'\fR column in the output. If the \f(CW\*(C`Update_time\*(C'\fR column is not \f(CW\*(C`NULL\*(C'\fR and is older than the specified interval ago, it will not be dumped. Thus, it means \*(L"dump tables that have changed since X amount of time\*(R" (presumably the last regular backup). This means the table will always be dumped if it uses InnoDB or another storage engine that doesn't report the \&\f(CW\*(C`Update_time\*(C'\fR. .Sp When \*(L"\-\-sets\*(R" is specified, the \*(L"\-\-settable\*(R" table determines when a table was last dumped, and the meaning of \f(CW\*(C`\-\-age\*(C'\fR reverses; it becomes \*(L"dump tables not dumped in X amount of time.\*(R" .IP "\-\-basedir" 4 .IX Item "--basedir" The directory in which files will be stored. If you use pre-canned options, such as \*(L"\-\-tab\*(R", MySQL Parallel Dump knows what the eventual filenames will be, and can place all the files in this directory. It will also create any parent directories that don't exist, if needed (see also \*(L"\-\-umask\*(R"). .Sp The default is the current working directory. .Sp If you write your own command line, MySQL Parallel Dump cannot know which arguments in the command line are filenames, and thus doesn't know the eventual destination of the dump files. It does not try to create parent directories in this case. .IP "\-\-binlogpos" 4 .IX Item "--binlogpos" Dump binary log positions from both \f(CW\*(C`SHOW MASTER STATUS\*(C'\fR and \f(CW\*(C`SHOW SLAVE STATUS\*(C'\fR, whichever can be retrieved from the server. The data is dumped to a file named \fI00_master_data.sql\fR. This is done for each backup set. .Sp The file also contains details of each table dumped, including the \s-1WHERE\s0 clauses used to dump it in chunks. .Sp This option is enabled by default. .IP "\-\-chunksize" 4 .IX Item "--chunksize" Specifies that the table should be dumped in segments of approximately the size given. The syntax is either a plain integer, which is interpreted as a number of rows per chunk, or an integer with a suffix of G, M, or k, which is interpreted as the size of the data to be dumped in each chunk. See \*(L"\s-1CHUNKS\s0\*(R" for more details. .IP "\-\-csv" 4 .IX Item "--csv" Changes \*(L"\-\-tab\*(R" options so the dump file is in comma-separated values (\s-1CSV\s0) format. The \s-1SELECT\s0 \s-1INTO\s0 \s-1OUTFILE\s0 statement looks like the following, and can be re-loaded with the same options: .Sp .Vb 3 \& SELECT * INTO OUTFILE %D.%N.%3C.txt \& FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\e"' \& LINES TERMINATED BY '\en' FROM %D.%N; .Ve .Sp This option implies \*(L"\-\-tab\*(R". .IP "\-\-databases" 4 .IX Item "--databases" Dump this comma-separated list of databases. Only applies when \*(L"\-\-sets\*(R" is not given. .IP "dbregex" 4 .IX Item "dbregex" Dump only databases whose names match this Perl regular expression. Only applies when \*(L"\-\-sets\*(R" is not given. .IP "\-\-defaultset" 4 .IX Item "--defaultset" When \*(L"\-\-sets\*(R" is given, this option makes MySQL Parallel Dump dump a \&\f(CW\*(C`default\*(C'\fR set consisting of tables not explicitly included in any set. .IP "\-\-defaults\-file" 4 .IX Item "--defaults-file" Only read default options from the given file. You must give an absolute pathname. .IP "\-\-flushlock" 4 .IX Item "--flushlock" Lock all tables globally with \f(CW\*(C`FLUSH TABLES WITH READ LOCK\*(C'\fR. This is enabled by default, unless you're dumping sets (see \*(L"\-\-sets\*(R"). This lock is taken once, at the beginning of the whole process, and is never released. .Sp If you want to lock only the tables you're dumping, use \*(L"\-\-locktables\*(R". .IP "\-\-flushlog" 4 .IX Item "--flushlog" Execute \f(CW\*(C`FLUSH LOGS\*(C'\fR after locking and before dumping master/slave binary log positions. This is done for each backup set. .Sp This option is \s-1NOT\s0 enabled by default because it causes the MySQL server to rotate its error log, potentially overwriting error messages. .IP "\-\-gzip" 4 .IX Item "--gzip" Compresses files with gzip. This is enabled by default unless your platform is Win32. By default, this causes the standard \s-1SQL\s0 dumps to be piped to gzip's \f(CW\*(C`STDIN\*(C'\fR and the result is redirected to the destination file. If this option isn't enabled, by default \f(CW\*(C`mysqldump\*(C'\fR's \f(CW\*(C`\-\-result\-file\*(C'\fR parameter is used to direct the dump to the destination file. When using \*(L"\-\-tab\*(R", this option causes gzip to be called separately on each resulting file after it is dumped (because \f(CW\*(C`SELECT INTO OUTFILE\*(C'\fR cannot be directed to a pipe). .IP "\-\-help" 4 .IX Item "--help" Displays a help message. .IP "\-\-host" 4 .IX Item "--host" Connect to host. .IP "\-\-ignoredb" 4 .IX Item "--ignoredb" Do not dump this comma-separated list of databases. Only applies when \&\*(L"\-\-sets\*(R" is not given. .IP "\-\-ignoretbl" 4 .IX Item "--ignoretbl" Do not dump this comma-separated list of table (not database.table) names. Only applies when \*(L"\-\-sets\*(R" is not given. .IP "\-\-locktables" 4 .IX Item "--locktables" Disables \*(L"\-\-flushlock\*(R" (unless it was explicitly set) and locks tables with \&\f(CW\*(C`LOCK TABLES READ\*(C'\fR. Enabled by default when \*(L"\-\-sets\*(R" is specified. The lock is taken and released with every set of tables dumped. .IP "\-\-numthread" 4 .IX Item "--numthread" Specifies the number of parallel processes to run. The default is 2 (this is MySQL Parallel Dump, after all \*(-- 1 is not parallel). On GNU/Linux machines, the default is the number of times 'processor' appears in \fI/proc/cpuinfo\fR. On Windows, the default is read from the environment. In any case, the default is at least 2, even when there's only a single processor. .IP "\-\-opt" 4 .IX Item "--opt" This is sort of related to \f(CW\*(C`mysqldump\*(C'\fR's \f(CW\*(C`\-\-opt\*(C'\fR argument, \fIbut not the same\fR. It does \fInot\fR pass \f(CW\*(C`\-\-opt\*(C'\fR to \f(CW\*(C`mysqldump\*(C'\fR. Instead, it passes the following: .Sp \&\f(CW\*(C`\-\-add\-drop\-table\*(C'\fR \f(CW\*(C`\-\-add\-locks\*(C'\fR \f(CW\*(C`\-\-allow\-keywords\*(C'\fR \f(CW\*(C`\-\-comments\*(C'\fR \&\f(CW\*(C`\-\-complete\-insert\*(C'\fR \f(CW\*(C`\-\-create\-options\*(C'\fR \f(CW\*(C`\-\-disable\-keys\*(C'\fR \&\f(CW\*(C`\-\-extended\-insert\*(C'\fR \f(CW\*(C`\-\-quick\*(C'\fR \f(CW\*(C`\-\-quote\-names\*(C'\fR \f(CW\*(C`\-\-set\-charset\*(C'\fR \&\f(CW\*(C`\-\-skip\-lock\-tables\*(C'\fR \f(CW\*(C`\-\-triggers\*(C'\fR \f(CW\*(C`\-\-tz\-utc\*(C'\fR .Sp These are what I consider to be sensible default options. .IP "\-\-password" 4 .IX Item "--password" Password to use when connecting. .IP "\-\-port" 4 .IX Item "--port" Port number to use for connection. .IP "\-\-quiet" 4 .IX Item "--quiet" Sets \*(L"\-\-verbose\*(R" to 0. .IP "\-\-sets" 4 .IX Item "--sets" Dump this comma-separated list of backup sets, in order. Requires \&\*(L"\-\-settable\*(R". See \*(L"\s-1BACKUP\s0 \s-1SETS\s0\*(R". The special \f(CW\*(C`default\*(C'\fR set is reserved; don't use it as a set name. .IP "\-\-setperdb" 4 .IX Item "--setperdb" Specifies that each database is a separate backup set. Each set is named the same as the database. Implies \*(L"\-\-locktables\*(R". .IP "\-\-settable" 4 .IX Item "--settable" Specifies the table in which backup sets are kept. It may be given in database.table form. .IP "\-\-socket" 4 .IX Item "--socket" Socket file to use for connection. .IP "\-\-tab" 4 .IX Item "--tab" Dump via \f(CW\*(C`SELECT INTO OUTFILE\*(C'\fR, which is similar to what \f(CW\*(C`mysqldump\*(C'\fR does with the \f(CW\*(C`\-\-tab\*(C'\fR option, but you're not constrained to a single database at a time. .Sp Before you use this option, make sure you know what \f(CW\*(C`SELECT INTO OUTFILE\*(C'\fR does! I recommend using it only if you're running MySQL Parallel Dump on the same machine as the MySQL server, but there is no protection if you don't. .Sp The files will be gzipped after dumping if \*(L"\-\-gzip\*(R" is enabled. This option sets \*(L"\-\-umask\*(R" to zero so auto-created directories are writable by the MySQL server. .IP "\-\-tables" 4 .IX Item "--tables" Dump this comma-separated list of table (not database.table) names. Only applies when \*(L"\-\-sets\*(R" is not given. .IP "\-\-tblregex" 4 .IX Item "--tblregex" Dump only tables whose names match this Perl regular expression. Only applies when \*(L"\-\-sets\*(R" is not given. .IP "\-\-test" 4 .IX Item "--test" Print commands instead of executing them. .IP "\-\-umask" 4 .IX Item "--umask" Set the program's \f(CW\*(C`umask\*(C'\fR to this octal value. This is useful when you want created files and directories to be readable or writable by other users (for example, the MySQL server itself). .IP "\-\-user" 4 .IX Item "--user" User for login if not current user. .IP "\-\-verbose" 4 .IX Item "--verbose" Sets the verbosity; repeatedly specifying it increments the verbosity. Default is 1 if not specified. See \*(L"\s-1OUTPUT\s0\*(R". .IP "\-\-version" 4 .IX Item "--version" Output version information and exit. .IP "\-\-wait" 4 .IX Item "--wait" If the MySQL server crashes during dumping, waits until the server comes back and then continues with the rest of the tables. The value is a number with a suffix (s=seconds, m=minutes, h=hours, d=days). MySQL Parallel Dump will check the server every second until this time is exhausted, at which point it will give up and exit. .Sp This implements Peter Zaitsev's \*(L"safe dump\*(R" request: sometimes a dump on a server that has corrupt data will kill the server. MySQL Parallel Dump will wait for the server to restart, then keep going. It's hard to say which table killed the server, so no tables will be retried. Tables that were being concurrently dumped when the crash happened will not be retried. No additional locks will be taken after the server restarts; it's assumed this behavior is useful only on a server you're not trying to dump while it's in production. .SH "SYSTEM REQUIREMENTS" .IX Header "SYSTEM REQUIREMENTS" You need Perl, \s-1DBI\s0, DBD::mysql, and some core packages that ought to be installed in any reasonably new version of Perl. .SH "BUGS" .IX Header "BUGS" Please use the Sourceforge bug tracker, forums, and mailing lists to request support or report bugs: . .SH "COPYRIGHT, LICENSE AND WARRANTY" .IX Header "COPYRIGHT, LICENSE AND WARRANTY" This program is copyright (c) 2007 Baron Schwartz. Feedback and improvements are welcome. .PP \&\s-1THIS\s0 \s-1PROGRAM\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 \&\s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 \&\s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. .PP This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation, version 2; \s-1OR\s0 the Perl Artistic License. On \s-1UNIX\s0 and similar systems, you can issue `man perlgpl' or `man perlartistic' to read these licenses. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, \s-1MA\s0 02111\-1307 \s-1USA\s0. .SH "AUTHOR" .IX Header "AUTHOR" Baron Schwartz. .SH "SEE ALSO" .IX Header "SEE ALSO" See also mysql-parallel-restore. .SH "VERSION" .IX Header "VERSION" This manual page documents Ver 0.9.10 Distrib 1053 \f(CW$Revision:\fR 1046 $.