vbr reference

vbr can back up and restore the full database, or specific schemas and tables.

vbr can back up and restore the full database, or specific schemas and tables. It also supports a number of other backup-related tasks—for example, list the history of all backups.

vbr is located in the Vertica binary directory—typically, /opt/vertica/bin/vbr.

Syntax

vbr { --help | -h }
  | { --task | -t } task  { --config-file | -c } configfile [ option[...] ]

Global options

The following options apply to all vbr tasks. For additional options, see Task-Specific Options.

Option Description
--help | -h Display a brief vbr usage guide.
{--task | -t} task

The vbr task to execute, one of the following:

  • backup: create a full or object-level backup

  • collect-garbage: rebuild the backup manifest and delete any unreferenced objects in the backup location

  • copycluster: copy the database to another cluster (Enterprise Mode only, invalid for HDFS)

  • full-check: verify all objects in the backup manifest and report missing or unreferenced objects

  • init: prepare a new backup location

  • listbackup: show available backups

  • quick-check: confirm that all backed-up objects are in the backup manifest and report discrepancies between objects in the backup location and objects listed in the backup manifest

  • quick-repair: build a replacement backup manifest based on storage locations and objects

  • remove: remove specified restore points

  • replicate: copy objects from one cluster to another

  • restore: restore a full or object-level backup

{--config-file | -c} path File path of the configuration file to use for the given task.
--debug level Level of debug messaging to the vbr log, an integer from 0 to 3 inclusive, where 0 (default) turns off debug messaging, and 3 is the most verbose level of messaging.
--nodes nodeslist

(Enterprise Mode only) Comma-delimited list of nodes on which to perform a vbr task. Listed nodes must match names in the Mapping section of the configuration file. Use this option to exclude DOWN nodes from a task, so vbr does not return with an error.

--showconfig

Displays the configuration values used to perform a specific task, displayed in raw JSON format before vbr starts task execution:

vbr -t task-cconfigfile --showconfig

--showconfig can also show settings for a given configuration file:

vbr -c configfile --showconfig

Task-specific options

Some vbr tasks support additional options, described in the sections that follow.

The following vbr tasks have no task-specific options:

  • copycluster

  • quick-check

  • quick-repair

Backup

Create a full database or object-level backup, depending on configuration file settings.

Option Description
--dry-run Perform a test run to evaluate impact of the backup operation—for example, its size and potential overhead.

Collect-garbage

Rebuild the backup manifest and delete any unreferenced objects in the backup location.

Option Description
--report-file Output results to a delimited JSON file.

Full-check

Produce a full backup integrity check that verifies all objects in the backup manifest against file system metadata, and then outputs missing and unreferenced objects.

Option Description
--report-file Output results to a delimited JSON file.

Init

Create a backup directory or prepare an existing one for use, and create backup manifests. This task must precede the first vbr backup operation.

Option Description
--cloud-force-init Qualifies the --task init command to force the init task to succeed on S3 or GS storage targets when an identity/lock file mismatch occurs.
--report-file Output results to a delimited JSON file.

Listbackup

Displays backups associated with the specified configuration file. Use this task to get archive (restore point) identifiers for restore and remove tasks.

Option Description
--list-all List all backups stored on the hosts and paths in the configuration file.
--list-output-file filename Redirect output to the specified file.
--json Use JSON delimited format.

Remove

Remove the backup restore points specified by the --archive option.

Option Description
--archive

Restore points to remove, one of the following:

  • timestamp: A single restore point to remove.

  • timestamp:timestamp: A range of contiguous restore points to remove.

  • all: Remove all restore points.

You obtain timestamp identifiers for the target restore points with the listbackup task. For details, see vbr listbackup.

Replicate

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

Option Description
--archive Timestamp of the backup restore point to replicate, obtained from the listbackup task.
--dry-run Perform a test run to evaluate impact of the replicate operation—for example, its size and potential overhead.
--target-namespace

Eon Mode only, the namespace in the target database to which objects are replicated.

vbr behaves differently depending on whether the target namespace exists:

  • Exists: vbr attempts to restore or replicate the objects to the existing namespace, which must have the same shard count, shard boundaries, and node subscriptions as the source namespace. If these conditions are not met, the vbr task fails.
  • Nonexistent: vbr creates a namespace in the target database with the name specified in --target-namespace and the shard count of the source namespace, and then replicates or restores the objects to that namespace.

If no target namespace is specified, vbr attempts to restore or replicate objects to a namespace with the same name as the source namespace.

Restore

Restore a full or object-level database backup.

Option Description
--archive Timestamp of the backup to restore, obtained from the listbackup task. If omitted, vbr restores the latest backup of the specified configuration.
--restore-objects Comma-delimited list of objects—tables and schemas—to restore from a given backup.
--include-objects Comma-delimited list of database objects or patterns of objects to include from a full or object-level backup.
--exclude-objects Comma-delimited list of database objects or patterns of objects to exclude from the set specified by --include-objects. This option can only be used together with --include-objects.
--dry-run Perform a test run to evaluate impact of the restore operation—for example, its size and potential overhead.
--target-namespace

Eon Mode only, the namespace in the target database to which objects are restored.

vbr behaves differently depending on whether the target namespace exists:

  • Exists: vbr attempts to restore or replicate the objects to the existing namespace, which must have the same shard count, shard boundaries, and node subscriptions as the source namespace. If these conditions are not met, the vbr task fails.
  • Nonexistent: vbr creates a namespace in the target database with the name specified in --target-namespace and the shard count of the source namespace, and then replicates or restores the objects to that namespace.

If no target namespace is specified, vbr attempts to restore or replicate objects to a namespace with the same name as the source namespace.

Interrupting vbr

To cancel a backup, use Ctrl+C or send a SIGINT to the vbr Python process. vbr stops the backup process after it completes 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 interrupting a backup operation does not affect the previous backup. The latest backup replaces the previous backup only after all other backup steps are complete.

See also