Copyright (C) 2000-2012 |
GNU Info (mysql.info)mysqlhotcopymysqlhotcopy, Copying MySQL Databases and Tables ------------------------------------------------ `mysqlhotcopy' is a perl script that uses `LOCK TABLES', `FLUSH TABLES' and `cp' or `scp' to quickly make a backup of a database. It's the fastest way to make a backup of the database, of single tables but it can only be run on the same machine where the database directories are. mysqlhotcopy db_name [/path/to/new_directory] mysqlhotcopy db_name_1 ... db_name_n /path/to/new_directory mysqlhotcopy db_name./regex/ `mysqlhotcopy' supports the following options: `-?, --help' Display a help screen and exit `-u, --user=#' User for database login `-p, --password=#' Password to use when connecting to server `-P, --port=#' Port to use when connecting to local server `-S, --socket=#' Socket to use when connecting to local server `--allowold' Don't abort if target already exists (rename it _old) `--keepold' Don't delete previous (now renamed) target when done `--noindices' Don't include full index files in copy to make the backup smaller and faster The indexes can later be reconstructed with `myisamchk -rq.'. `--method=#' Method for copy (`cp' or `scp'). `-q, --quiet' Be silent except for errors `--debug' Enable debug `-n, --dryrun' Report actions without doing them `--regexp=#' Copy all databases with names matching regexp `--suffix=#' Suffix for names of copied databases `--checkpoint=#' Insert checkpoint entry into specified db.table `--flushlog' Flush logs once all tables are locked. `--tmpdir=#' Temporary directory (instead of /tmp). You can use `perldoc mysqlhotcopy' to get a more complete documentation for `mysqlhotcopy'. `mysqlhotcopy' reads the groups `[client]' and `[mysqlhotcopy]' from the option files. To be able to execute `mysqlhotcopy' you need write access to the backup directory, `SELECT' privilege to the tables you are about to copy and the MySQL `Reload' privilege (to be able to execute `FLUSH TABLES'). automatically generated by info2www version 1.2.2.9 |