This section introduces concepts, terms, and behavior that you need to be familiar with before attempting to back up and restore your databases, schemas, and tables.

Backup and Restore Clients

The backup and restore clients are part of the ybtools package and are similar to ybload; some of the parameters and options are the same (such as the logging and connectivity options).

Three distinct executables run the following commands:
  • ybbackup
  • ybrestore
  • ybbackup-list (which returns a list of backups)
Note: You must run ybbackup and ybrestore commands as a database superuser. Regular users cannot run these commands. The ybbackup-list command does not require a database connection, so superuser access is not required.

Online Backups

Yellowbrick supports online backups. Backup operations do not interfere with user queries or other database activities. Note that changes being introduced by running transactions that have not yet committed are not captured in a concurrently running backup. As soon as a transaction that changes the database commits, a subsequently started backup picks up those changes.

Incremental and Full Backups

Every backup is technically an incremental backup. Full backups are supported but do not need to be specified as such. A full backup occurs by default the first time you back up a database under a new backup name.

A backup name identifies a distinct chain or sequence of backups that are stored in the same backup location and belong to databases in the same appliance. A backup location is a path to a target directory, and the backup name is appended to that path. A chain of backups in a specific location is also known as a backup bundle.

Scope of Backups

In a single ybbackup command, you can back up:
  • One or more databases
  • All databases on the appliance
A database backup includes the following items for each database that is specified:
  • Schemas
  • Tables and views (temporary tables are not backed up)
  • Data in tables
  • Ownership and permissions on database objects (see ybrestore Command)
  • Stored procedures
  • Sequences
Note: System-level artifacts, such as database users and workload management profiles, cannot be backed up. Table statistics are not backed up but are recalculated and re-created when a database is restored.

You can also run a metadata-only backup, which is a way to capture the DDL for the specified objects, but not the data. You can then restore the metadata-only backup to another database or appliance for testing or troubleshooting purposes.

Backup Files

Backup files are saved in a proprietary format, and the data is not encrypted. Users cannot access these files, and restore operations work only when the target is a Yellowbrick appliance. If you need to encrypt backup data at rest, implement encryption within your storage system.

Restore Operations

Restore operations provide some flexibility in terms of the selected restore point and specific databases you want to restore. A restore point is a reference to a particular backup that you want to restore from. You can restore from any point in a backup chain, and you can restore one database while other users continue to access other databases on the system.

You can specify the restore point for each database in three different ways:
  • Specify the latest backup
  • Specify a point in time that matches the timestamp for a listed backup
  • Specify a numbered backup from the list of available backups

Based on the restore point you choose, the system automatically determines the restore path (the sequence of incremental backups) that need to be merged.

Note: During a restore operation, the database that is being restored is accessible to the yellowbrick superuser. It is strongly recommended that you do not log into the database until the restore is complete.