Skip to content

ybbackup Options

This section contains detailed descriptions of the ybbackup command-line options. See also Common Options in ybtools and ybrestore Options.

Note the following points about the format of these options and their values:

  • Options are listed in alphabetical order for quick reference.
  • Option names are shown in lowercase; they are case-sensitive.
  • Specific valid option values (such as true and false) are shown in lowercase. Variables for option values, such as STRING, are shown in uppercase. Option values are not case-sensitive.
  • The requirements for quoting option strings vary by client platform. Values are shown without quotes, but quotes are sometimes required. For example, if you specify the # character in a Linux shell, it must be enclosed by single or double quotes.

Note: Storage locations for backup files are not prefaced with an option name. See Storage Locations for Backups.

To see all of these options in the online help, run the ybbackup --help and ybbackup --help-advanced commands.

-c STRING, --chain STRING

Specify the name of the backup chain. You can use any meaningful name that defines the contents of a particular backup set. If you do not specify this option, the chain is named default.

Multiple chains and databases may be backed up to the same storage location. Backups that belong to different chains and databases are stored in distinct sets of files.

--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, --cumu

Use this option to take a cumulative backup.

-d, --dbname

Name the database to back up. You must specify one database only.

--desc STRING

Include a description of the backup. The maximum length is 256 characters.

--exclude SCHEMA

Specify the names of schemas that you want to exclude from a full backup. Database objects that belong to the specified schemas will not be backed up. This option may only be used for full backups; however, all backups in a given chain must respect the exclude list as defined for the first full backup. You cannot define an exclude list in the first backup, then change it in a subsequent full backup. The system depends on a consistent scope for all the backups in a single backup chain.

You can use a comma-separated list or a wildcard character to specify multiple schemas. Do not include any blanks (space characters) in the list; they will be treated as part of the schema name. For example:

--exclude public,dev,new
--exclude dev*
--exclude yb*
-f, --full

Use this option to take a full backup.

-h, --host

Specify the database server host. Alternatively, you can set this value with the YBHOST environment variable. Defaults to localhost.

-I, --inc

Use this option to take an incremental backup.

--name

Specify a unique name (across all backup chains) for this backup snapshot. Do not try to reuse the same snapshot name within different backup chains.

The name must be no greater than 64 characters. Directory paths are not allowed. For example:

--name sept6_2019_premdb_weekly_cumu

The backup name must contain only the following valid ASCII characters:

  • A-Z
  • a-z
  • 0-9
  • _

Mixed-case names are allowed, and the backup storage file system must support Linux-style mixed-case file names.

The --name value in the ybbackup command corresponds to the snapshot_name in the output for ybbackupctl commands.

--retry-failed-backups, --no-retry-failed-backups

Enable retrying up to --retry-per-table-max times if a table fails to back up during the session. This option is only applicable to YBD instances that also support retrying.

--retry-per-table-max NUMBER

The maximum number of retry attempts for a single table before the program terminates with an error.

Parent topic:ybbackup Commands