Appearance
ybbackupctl Options
Only one "control command" may be used each time you run the ybbackupctl
tool. The control commands are as follows:
--copy-to
--delete
--fix-bundle-paths
--help
--list
--purge
If no source location is specified in a ybbackupctl
command, the location is assumed to be the current working directory. To specify a source location, append the directory path (or paths) to the end of the command. Do not specify an option name for these paths.
See also Storage Locations for Backups.
- -c STRING, --chain STRING
- The backup chain to use. Default:
default
. - --compatibility-mode BACKWARD | FORWARD | ALL | NONE
- Allow/forbid running commands on backup bundles with newer/older bundle versions than the client tools bundle version.
BACKWARD
allows operating on backup bundles with bundle versions same as or older than the client tools bundle version.FORWARD
allows operating on backup bundles with bundle versions same as or newer than the client tools bundle version.ALL
allows operating on all backup bundles.NONE
allows operating on backup bundles with the same bundle version as the client tools bundle version.
By default BACKWARD
is chosen.
- -C STRING, --copy-to STRING
Copy a single backup to another location. The
--copy-to
command requires one or more destination (target) storage locations, which should be specified directly after--copy-to
. The storage you are copying to does not have to exist when you run theybbackupctl
command.You also need to specify the following options:
--point
to name the backup--chain
(if not using thedefault
chain)--uuid
to identify the database
Specify the input (source) storage location of the backup at the end of the command, or change to the directory where the backup resides. If you do not specify an input location, the current working directory is assumed to be the source of the backup that you want to copy. See ybbackupctl Examples.
Only completed backups can be copied. You cannot copy a backup that is in progress.
Note: When you copy backups with this command, the metadata for the backup files is included. (You do not need to fix the paths with the
-X
option as well.)- -D, --delete
Delete a single backup, as specified with the
--point
argument. This command also requires the--uuid
option to identify the database. If the backup chain is not nameddefault
, specify the--chain
option as well.The
--delete
option can be used to delete any backup entry in a backup chain; in turn, the chain associated with the deleted entry cannot be used to restore a database. (The --purge option is more limited in its scope.)- -X, --fix-bundle-paths STRING
Modify paths to source locations for backup files. This option is useful when backup files have been moved from one storage system to another, or when different clients have different mount point names for the same storage. The path you specify for this option is checked for a valid backup bundle that matches the database, backup chain, and backup name. If the check is successful, the metadata for that backup bundle is updated, making it possible for subsequent backups and restores to run, using the modified path.
- --ignore-failed-delete
Ignore failed file deletion in -D, --delete / --purge operations. Throw a warning and continue execution instead of terminating the whole operations.
- --integrity-check NONE | FAST | STRICT
Specify integrity checking (checksum validation) of new backup data files that are written when the
--copy-to
command is used. Integrity checking has an impact on performance but also reduces the likelihood that subsequent restore operations will fail because backup files are corrupted.NONE
(the default): no integrity checking; no impact on performance.FAST
: file-level integrity checking; reduces performance by a small percentage.STRICT
: stricter integrity checking, including packet placements inside each file; reduces performance by a greater amount.- -L, --list
List the contents of a backup set. Use the
--verbose
option to return more information about the tables and other objects in the backup. You must specify the location of the backups you want to list.Only completed backups can be listed. You cannot list backups that are in progress.
- --point STRING, -a STRING
Identify the backup you want to manage in one of three ways:
latest
oroldest
backup in the chain- Backup snapshot name (the value for
--name
when theybbackup
command was run). For example:PremDBFullBackup20190906
orDB1_Sept_06
- Backup timestamp in
YYMMDD HH:MM:DD
format. For example:190906 12:00:00
- --purge FULL | INVALID | INVALID_TABLES_ALL | INVALID_TABLES_AT, -p FULL | INVALID | INVALID_TABLES_ALL | INVALID_TABLES_AT
Purge either obsolete/full backups from the backup set, or all invalid tables. A full backup becomes obsolete when a new full backup is taken, which breaks the backup chain. Backups are invalid if they do not complete successfully (because of cancellation or a network issue, for example). Tables can be INVALID because a transfer failed partway and the corresponding files have not been deleted. You must specify
FULL
,INVALID
,INVALID_TABLES_ALL
,INVALID_TABLES_AT
for the purge command. You also need to specify the following options:--chain
(if not using thedefault
chain)--uuid
to identify the database--point
if usingINVALID_TABLES_AT
See also -D, --delete.
- --temp-workdir STRING
Use the specified location as a temporary working directory for backup bundle processing. By default, the current working directory is used.
ybbackupctl
operations that write or read from object storage require a writable local directory during processing. When processing is finished, this directory is empty.- --uuid STRING, -U STRING
Identify the database by specifying its full UUID string. This option is required for
--purge
,--delete
, and--copy-to
operations. You can copy and paste the UUID string from the results of theybbackupctl --list
command.- --verbose, --no-verbose
Specify --verbose to get more detailed output. The default is
--no-verbose
.