17.3 Server Repository Options

These repository options specify various parameters related to the database server to which a backup is restored.

These options are used only with restore operations, that is, copy-back and copy-back-and-apply-log. The descriptions below explain how these options are used with mysqlbackup; for information about how these options are used with the MySQL server, click the option names to see the descriptions in the MySQL Reference Manual.

  • datadir=PATH

    This is the data directory for the restored MySQL server. It should be supplied with the datadir value of the target server for the restore.

    This option must be specified for any restore operation.

  • log-bin[=basename]

    Specify the location for the binary log to be restored. By default, during a restore, the binary log is restored to the same location it was found on the backed-up server. Use this option to specify a different target location for the binary log. The option works similarly as the --log-bin option of the MySQL server in determining the location and the name of the binary log files—see description of the server --log-bin option for details. As a summary:

    • Using this option without supplying a basename puts the binary log in the target server's data directory with the default basename host_name-bin.

    • Using this option while supplying a basename puts the binary log in the target server's data directory with the specified basename.

    • Using this option while supplying a basename containing a full file path (for example, /home/admin/db/binlogdir/binlog) puts the binary log on the target server in the specified folder (/home/admin/db/binlogdir/) using the supplied basename (binlog).

    The option is only for the copy-back-and-apply-log and copy-back operations. Using it with any other operations makes the command fail.

  • relay-log[=basename]

    Specify the location for the relay log to be restored on a slave server. By default, during a restore for a slave server, the relay log is restored to the same location it was found on the backed-up slave server. Use this option to specify a different target location for the relay log. The option works similarly as the --log-bin option for mysqlbackup in determining the location and the name of the relay log—see description of the --log-bin option for details.

    The option is only for the copy-back-and-apply-log and copy-back operations. Using it with any other operations makes the command fail.

  • innodb_data_home_dir=PATH

    The directory where InnoDB data files are to be restored. Its value is derived as follows:

  • innodb_log_group_home_dir=PATH

    The directory where InnoDB log files are to be restored. Its value is derived as follows:

  • innodb_undo_directory=PATH

    The directory where the InnoDB undo log files are to be restored. Its value is derived as follows:

    Warning

    When using this option, make sure the undo log location does not change between successive restores of a full and an incremental backups, or of two incremental backups. Otherwise, the restore is going to fail.