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 operations, except for partial restores (see Section 5.1.4, “Table-Level Recovery (TLR)” for details).
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
puts the binary log in the target server's data directory with the default basenamebasename
.host_name
-binUsing this option while supplying a
puts the binary log in the target server's data directory with the specified basename.basename
Using this option while supplying a
containing a full file path (for example,basename
/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
andcopy-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 replica server. By default, during a restore for a replica server, the relay log is restored to the same location it was found on the backed-up replica server. Use this option to specify a different target location for the relay log. The option works similarly as the
--relay-log
option of the MySQL server in determining the location and the name of the relay log files—see description of the server --relay-log option for details. As a summary:Using this option without supplying a
puts the relay log in the target server's data directory with the default basenamebasename
.host_name
-relay-binUsing this option while supplying a
puts the relay log in the target server's data directory with the specified basename.basename
Using this option while supplying a
containing a full file path (for example,basename
/home/admin/db/relaylogdir/relaylog
) puts the relay log on the target server in the specified folder (/home/admin/db/relaylogdir/
) using the supplied basename (relaylog
).
The option is only for the
copy-back-and-apply-log
andcopy-back
operations. Using it with any other operations makes the command fail.log-bin-index
[=PATH
]Specify the absolute path (including file name and extension) for restoring the index file that lists all the binary log files, if it is different from the default path given below.
Default:
.data_dir
/host_name
-bin.indexrelay-log-index
[=PATH
]Specify the absolute path (including file name and extension) for restoring the index file that lists all the relay log files, if it is different from the default path given below.
Default:
.data_dir
/host_name
-relay-bin.indexinnodb_data_home_dir
=PATH
Specifies the directory where InnoDB data files reside. Usually the same as
datadir
, but can be different. This parameter, together withinnodb_data_file_path
=SIZE
, determines where the InnoDB data files such asibdata1
,ibdata2
, and so on, are situated within the MySQL server.For backups:You do not need to specify this option, because its value is retrieved automatically using the database server connection.
For restores: The directory where InnoDB data files are to be restored. Specify the option only if the InnoDB data files are to be restored outside of the server's data directory. For release 8.0.16 and later: the specified directory must be non-existent or empty, or the restore operation will fail.
If
innodb_data_home_dir
is not specified, it inherits the value ofdatadir
.If
innodb_data_home_dir
is a relative path, the path is located relative to (that is, underneath) thedatadir
value.An
innodb_data_home_dir
of""
refers to the/
root directory.If
innodb_data_home_dir
is an absolute path, its value is used as-is.
innodb_log_group_home_dir
=PATH
Specifies where the InnoDB redo log reside within the server repository. Usually the same as
datadir
, but can be different.For backups: You do not need to specify this option, because its value is retrieved automatically using the database server connection.
For restores: The directory where InnoDB redo log files are to be restored. Specify the option only if the InnoDB redo log files are to be restored outside of the server's data directory. For release 8.0.16 and later: the specified directory must be non-existent or empty, or the restore operation will fail.
If
innodb_log_group_home_dir
is not specified, it inherits the value ofdatadir
.If
innodb_log_group_home_dir
is a relative path, the path is taken to be relative to (that is, underneath) thedatadir
value.If
innodb_log_group_home_dir
is an absolute path, its value is used as-is.
Specifies where the InnoDB undo log reside within the server repository. Usually the same as
datadir
, but can be different.For backups: You do not need to specify this option, because its value is retrieved automatically using the database server connection.
For restores:
For release 8.0.16 and later: The directory where the default InnoDB undo tablespaces, as well as any non-default undo tablespaces resided in the backed-up server's data directory, are to be restored. (External undo tablespaces are restored by default to the locations they were found on the backed-up server; see the description for undo log files for details.) The specified directory must be non-existent or empty, or the restore operation will fail.
For release 8.0.15 and earlier: The directory where the InnoDB undo log files are to be restored. Specify the option only if the undo log files are to be restored outside of the server's data directory.
Its value is derived as follows:
If
innodb_undo_directory
is not specified, it inherits the value ofdatadir
.If
innodb_undo_directory
is a relative path, the path is taken to be relative to (that is, underneath) thedatadir
value.If
innodb_undo_directory
is an absolute path, its value is used as-is.
WarningWhen 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.