DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info) mysqlhotcopy

Info Catalog (mysql.info) mysqldump (mysql.info) client-utility-programs (mysql.info) mysqlimport
 
 8.11 `mysqlhotcopy' -- A Database Backup Program
 ================================================
 
 `mysqlhotcopy' is a Perl script that was originally written and
 contributed by Tim Bunce. It uses `LOCK TABLES', `FLUSH TABLES', and
 `cp' or `scp' to make a database backup quickly. It is the fastest 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.
 `mysqlhotcopy' works only for backing up `MyISAM' and `ARCHIVE' tables.
 It runs on Unix and NetWare.
 
      shell> mysqlhotcopy DB_NAME [/PATH/TO/NEW_DIRECTORY]
 
      shell> mysqlhotcopy DB_NAME_1 ... DB_NAME_N /PATH/TO/NEW_DIRECTORY
 
 Back up tables in the given database that match a regular expression:
 
      shell> mysqlhotcopy DB_NAME./REGEX/
 
 The regular expression for the table name can be negated by prefixing
 it with a tilde (‘`~'’):
 
      shell> mysqlhotcopy DB_NAME./~REGEX/
 
 `mysqlhotcopy' supports the following options:
 
    * -help, -?
 
      Display a help message and exit.
 
    * -addtodest
 
      Do not rename target directory (if it exists); merely add files to
      it.
 
    * -allowold
 
      Do not abort if a target exists; rename it by adding an `_old'
      suffix.
 
    * -checkpoint=DB_NAME.TBL_NAME
 
      Insert checkpoint entries into the specified database DB_NAME and
      table TBL_NAME.
 
    * -chroot=PATH
 
      Base directory of the `chroot' jail in which `mysqld' operates. The
      PATH value should match that of the -chroot option given to
      `mysqld'.
 
    * -debug
 
      Enable debug output.
 
    * -dryrun, -n
 
      Report actions without performing them.
 
    * -flushlog
 
      Flush logs after all tables are locked.
 
    * -host=HOST_NAME, -h HOST_NAME
 
      The hostname of the local host to use for making a TCP/IP
      connection to the local server. By default, the connection is made
      to `localhost' using a Unix socket file.
 
    * -keepold
 
      Do not delete previous (renamed) target when done.
 
    * -method=COMMAND
 
      The method for copying files (`cp' or `scp').
 
    * -noindices
 
      Do not include full index files in the backup. This makes the
      backup smaller and faster. The indexes for reloaded tables can be
      reconstructed later with `myisamchk -rq'.
 
    * -password=PASSWORD, -pPASSWORD
 
      The password to use when connecting to the server. Note that the
      password value is not optional for this option, unlike for other
      MySQL programs. You can use an option file to avoid giving the
      password on the command line.
 
      Specifying a password on the command line should be considered
      insecure. See  password-security.
 
    * -port=PORT_NUM, -P PORT_NUM
 
      The TCP/IP port number to use when connecting to the local server.
 
    * -quiet, -q
 
      Be silent except for errors.
 
    * -record_log_pos=DB_NAME.TBL_NAME
 
      Record master and slave status in the specified database DB_NAME
      and table TBL_NAME.
 
    * -regexp=EXPR
 
      Copy all databases with names that match the given regular
      expression.
 
    * -resetmaster
 
      Reset the binary log after locking all the tables.
 
    * -resetslave
 
      Reset the `master.info' file after locking all the tables.
 
    * -socket=PATH, -S PATH
 
      The Unix socket file to use for the connection.
 
    * -suffix=STR
 
      The suffix for names of copied databases.
 
    * -tmpdir=PATH
 
      The temporary directory. The default is `/tmp'.
 
    * -user=USER_NAME, -u USER_NAME
 
      The MySQL username to use when connecting to the server.
 
 `mysqlhotcopy' reads the `[client]' and `[mysqlhotcopy]' option groups
 from option files.
 
 To execute `mysqlhotcopy', you must have access to the files for the
 tables that you are backing up, the `SELECT' privilege for those
 tables, and the `RELOAD' privilege (to be able to execute `FLUSH
 TABLES').
 
 Use `perldoc' for additional `mysqlhotcopy' documentation, including
 information about the structure of the tables needed for the
 -checkpoint and -record_log_pos options:
 
      shell> perldoc mysqlhotcopy
 
Info Catalog (mysql.info) mysqldump (mysql.info) client-utility-programs (mysql.info) mysqlimport
automatically generated byinfo2html