ybbackup Commands
Each ybbackup
command defines:
- Database connection options
- A target database (database name)
- The backup type: full, cumulative, or incremental
- The backup name (which must be unique across all backup chains; do not reuse backup names)
- The backup chain
- Other options, such as logging parameters
- The target location(s) where the backup will be stored (URIs)
You must run the ybbackup
tool as a superuser.
Syntax Summary
./ybbackup
--dbname database_name
--full | --cumu | --inc
--name backup_name
--chain backup_chain
[ database_connection_options ]
[ other_options ]
[ storage_locations ]
For details about the options and their syntax, see ybbackup Options.
To look at your backup history, use the ybbackupctl --list
command or query the sys.log_backup view.
Storage Locations for Backups
Two main types of storage locations are supported:
- Local or locally mounted file systems (relative paths are allowed)
- Object storage:
- AWS S3 (and S3-compatible storage). For example:
s3://bucket/backup/
- Microsoft Azure Blob. For example:
azure://container/backup/
- Microsoft Azure Data Lake. For example:
azdl2://container/backup/
Storage locations are not prefaced with an option name and may appear anywhere in the command line. For clarity, a good practice is to specify storage locations at the end of the command. For example:
$ ybbackup -d premdb --name Oct4full --full --chain October2019
/home/yb100/premdb_daily_backups
This example specifies two directories:
$ ybbackup -d premdb --name Oct4full --full --chain October2019
/home/yb100/premdb_daily_backups/friday1
/home/yb100/premdb_daily_backups/friday2
The same behavior and requirements apply when you specify source file directories in ybbackupctl
commands.
Multiple backup 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. Only the metadata files are common.
In This Section
Parent topic:Backup and Restore