除了用于创建和恢复单文件备份的命令(即backup-to-image和
copy-back-and-apply-log)之外,
mysqlbackup还提供了许多其他命令供您使用单文件备份。它们在下面解释。
mysqlbackup [STD-OPTIONS]
[--backup-image=IMAGE] [--backup-dir=PATH]
[MESSAGE-LOGGING-OPTIONS]
[PROGRESS-REPORT-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
image-to-backup-dir
mysqlbackup [STD-OPTIONS]
[--backup-dir=PATH] [--backup-image=IMAGE]
[MESSAGE-LOGGING-OPTIONS]
[PROGRESS-REPORT-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
backup-dir-to-image
mysqlbackup [STD-OPTIONS]
[--backup-image=IMAGE]
[MESSAGE-LOGGING-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
list-image
mysqlbackup [STD-OPTIONS]
[--backup-image=IMAGE]
[--backup-dir=PATH]
[--src-entry=PATH] [--dst-entry=PATH]
[--uncompress]
[MESSAGE-LOGGING-OPTIONS]
[PROGRESS-REPORT-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
extract
image-to-backup-dir将单个文件备份解压缩为完整备份目录结构。您指定图像文件和解包目标目录的路径。有关用法示例,请参阅第 4.3.1 节,“制作单个文件备份”。
backup-dir-to-image将现有备份目录打包到单个文件中。参数的值
--backup-image应该是“-”(代表标准输出)或backup-dir目录外的绝对路径。指定--backup-image值-(标准输出)以将现有备份目录结构流式传输到磁带设备或将备份传输到另一台服务器的命令。有关用法示例,请参阅第 4.3.1 节,“制作单个文件备份”。
list-image显示单个文件备份的内容。列出图像中的所有文件和目录。有关用法示例,请参阅 第 4.3.1 节,“制作单个文件备份”。
笔记list-image仅当云代理支持 HTTP 范围标头时,才能在云备份上执行 该操作。
extractUnpacks individual files or directories from a single-file backup. It is useful for troubleshooting, or for restorations that do not require the full set of backup data. The resulting file or directory goes into the current directory, or into the backup directory, if specified with
--backup-dir; in either case, the destination directory must be empty. For usage examples, see Section 4.3.1, “Making a Single-File Backup”.The
--src-entry=option can be used for selective extraction of files or directories whose path names in the image contain thestringstringspecified with the option.NotesSome items are always extracted from the backup; see the descriptions of
--src-entryfor details.The option is currently not supported for the extraction of cloud backups, which can only be extracted in full.
The
--dst-entry=option, along withpath--src-entry=option, can be used to extract files or directories into user-specified locations; see the description for the option for details.pathFor MySQL Enterprise Backup 4.1.4 and later: Use the
--uncompressoption to extract files from a compressed single-file backup.The default destination for the extract is the current working directory. All the files with relative pathnames in the image are extracted to pathnames relative to the destination directory. If the image contains some entries with absolute pathnames, those entries are extracted to the same absolute pathnames on the local system even if the
--backup-diroption is specified. The--dst-entryoption must be used to relocate an absolute pathname; see Example 4.12, “Dealing with Absolute Path Names”.