Running Backup and Restore Commands

The backup and restore commands connect to the database via JDBC as Java client applications. After you have downloaded and installed the client tools (ybtools), you can run the ybbackup, ybrestore, and ybbackup-list programs. You may want to add /usr/bin to your PATH environment variable.

Getting Online Help

Use one of the following options to return online help text for ybbackup, ybrestore, or ybbackup-list:
  • -?
  • --help
The following example returns help for the ybbackup command:
myuser@myybd:~/usr/bin$ ./ybbackup -?
Usage: ybbackup [options] 
  Options:
    -a, --all
...

Setting Up a Database Connection

To run backup and restore operations, you have to start a database session on the server where the destination database resides. This session requires connection information that you can provide either as ybbackup or ybrestore options on the command line or as current values for environment variables.
Note: These connection parameters are not required for the ybbackup-list command.
Command-Line Options Environment Variable Description Example
-h or --host YBHOST Destination server host name. Default: localhost
-h test.ybsystem.io
export YBHOST=test.ybsystem.io
-p or --port YBPORT Destination server port number. Default: 5432
--port 5433
export YBPORT=5433
-U or --username YBUSER Database login username. No default.
-U bobr
export YBUSER=bobr
Note: You must run backup and restore commands as a database superuser. Regular users cannot run these commands. You can run the backup-list command as any database user because this command does not require a connection to a database.
-W or --password YBPASSWORD Interactive prompt for the database user's password. No default.
--password
export YBPASSWORD=********

WLM Resources for Backup and Restore Operations

Backup and restore operations are assigned to the large pool in the Default profile. In most cases, this pool provides adequate resources for intensive write operations. In general, Yellowbrick Data recommends that you do not attempt to redirect backup and restore operations to other resource pools. However, you can create your own pools and WLM rules to run these operations if the Default profile cannot manage them efficiently.