vbr reference

vbr allows you to back up and restore either the full database, or one or more schema and table objects of interest.

vbr allows you to back up and restore either the full database, or one or more schema and table objects of interest. You can also copy a cluster and list backups you created previously.

Most tasks cannot run concurrently; however, replication tasks can run concurrently with each other and with backups. Concurrent tasks must not use the same snapshot name.

vbr is located in the Vertica binary directory (/opt/vertica/bin/vbr on most installations).

Syntax

/opt/vertica/bin/vbr { command }
   [ --archive timestamp ]
   [ --config-file file ]
   [ --debug level]
   [ --nodes node[,...] ]
   [ --showconfig ]

command is one of the following:

Full | Short Command Description
--help | -h Shows a brief usage guide for the command.
--showconfig Displays the current configuration settings.
--task | -t
{  backup
 | collect-garbage
 | copycluster
 | full-check
 | init
 | listbackup
 | quick-check
 | quick-repair
 | remove
 | replicate
 | restore }

Performs the specified task:

  • backup creates a full database or object-level backup, depending on configuration file specification.

  • collect-garbage rebuilds the backup manifest and deletes any unreferenced objects in the backup location.

  • copycluster (not supported for Eon Mode databases) copies the database to another Vertica cluster.

  • full-check verifies all objects listed in the backup manifest against file system metadata, and then outputs missing and unreferenced objects.

  • init creates a new backup directory, or prepares an existing one, for use and creates necessary backup manifests. You must perform this task before the first time you create a backup in a directory.

  • listbackup displays the existing backups associated with the configuration file you supply. View this display to get the name of a backup that you want to restore.

  • quick-check confirms that all backed-up objects appear in the backup manifest, and then outputs discrepancies between objects in the backup location and objects listed in the backup manifest.

  • quick-repair builds a replacement backup manifest, based on storage locations and objects.

  • remove removes the specified backup or restore point.

  • replicate copies objects from one cluster to an alternate cluster. This task can run concurrently with backup and other replicate tasks.

  • restore restores a full or object-level database backup; requires the configuration file that created the backup.

Parameters

Parameter Description
--archive timestamp

Used with --task restore and --task remove commands, the timestamp of the backup to restore or remove:

> vbr --task restore --config-file myconfig.ini --archive=20160115_182640

-c file
--config-file file
The configuration file to use as an absolute or relative path to the location from which you start vbr. If no file exists, an error occurs and vbr cannot continue.
--nodes node[,...]

Comma-delimited list of nodes on which to perform a vbr task. Listed nodes match the names in the Mapping section of the configuration file.

--debug level The level of debugging messages (from 0 to 3) that vbr provides. Level 3 indicates verbose, while level 0, the default, indicates no messages.
--report-file path/filename Optional, outputs a delimited JSON file that describes the results of the associated full backup integrity check or garbage collection task.
--restore-objects objects The individual objects to restore from a full or object-level backup. If you use wildcards, use --include-objects and --exclude-objects instead.
--s3-force-init Used with the --task init command, forces the init task to succeed on S3 storage targets when there is an identity/lock file mismatch.
--showconfig The configuration values used to perform the task, displayed in raw JSON format before vbr starts begins.
--list-all Used with the --task listbackup command, displays a list of all backups stored on the hosts and paths listed in the specified configuration file.
--json Used with the --task listbackup command, displays a JSON delimited list of all backups stored on the hosts and paths listed in the specified configuration file.
--list-output-file path/filename Used with the --task listbackup command, outputs a file containing a JSON delimited list of all backups stored on the hosts and paths listed in the specified configuration file.
--dry-run Used with the --task command for backup, restore and replicate tasks, performs a test run of the specified command without actually performing the task. You can use this command to evaluate the impact of a particular vbr command without actually performing that command. For example, you could see the size of a potential backup, or the objects contained in that backup. Any task performed with the dry-run parameter has no impact on your database.
--include-objects include-list

Specifies a comma-delimited list of database objects or patterns of objects to restore from a full or object-level backup.

You cannot use this parameter with the --restore-objects parameter.

--exclude-objects exclude-list

Along with --include-objects, the database objects or patterns of objects to restore from a full or object-level backup, invalid in combination with parameter --restore-objects.

You can use --include-objects to specify a group of objects and then use --exclude-objects to remove objects from the set. Use commas to delimit multiple objects and wildcard patterns.

You cannot use this parameter with the --restore-objects parameter.

--restore-objects='restore-list'

A comma-delimited list of tables and schemas to restore from a given backup, invalid in combination with parameters --include-objects and --exclude-objects.

For usage details, see Restoring individual objects.

Interrupting vbr

To cancel a backup, use Ctrl+C or send a SIGINT to the Python process running vbr. vbr stops the backup process after it has completed copying the data. Canceling a vbr backup with Ctrl+C closes the session immediately.

The files generated by an interrupted backup process remain in the target backup location directory. The next backup process picks up where the interrupted process left off.

Backup operations are atomic, so that interrupting a backup operation does not affect the previous backup. Vertica replaces the previous backup only as the very last step of backing up your database.

restore or copycluster operations overwrite the database catalog directory. Interrupting either of these processes leaves the database unusable until you restart the process and allow it to finish.

See also