[Mapping]

vbr configuration files have one [Mapping] section that specifies all database nodes that are included in a backup. It also includes the backup host and directory of each node. If objects are replicated to an alternative database, the [Mapping] section maps the target database nodes to the source database backup locations.

If you edit an existing configuration file to add a Mapping in the current style, the new section must combine information from all existing mappings.

The [CloudStorage] and [Mapping] configuration sections are mutually exclusive. If you include both, the backup fails.

Unlike other configuration file sections, the [Mapping] section does not use named parameters. Instead, it uses entries of the following format:

dbNode = backupHost:backupDir

For example:

[Mapping]
v_sec_node0001 = pri_bsrv01:/archive/backup
v_sec_node0002 = pri_bsrv02:/archive/backup
v_sec_node0003 = pri_bsrv03:/archive/backup

The following table describes these three elements.

Argument Description
dbNode

The name of the database node as recognized by Vertica. This value is not the node's host name, but rather the name Vertica uses internally to identify the node, usually in the form of:

v_node00x

To find database node names in your cluster, query the node_name column of the NODES system table.

backupHost

Indicates the target host name or IP address on which to store this node's backup. The backupHost name is different from dbNode. The copycluster command uses this value to identify the target database node host name.

Although supported, backups to an NFS host might perform poorly, particularly on networks shared with rsync operations.

backupDir

Identifies the full path to the directory on the backup host or node where the backup will be stored. The following requirements apply to the specified directory:

  • Already exists when you run vbr with the --task backup option
  • Writable by the user account used to run vbr.
  • Unique to the database you are backing up. Multiple databases cannot share the same backup directory.
  • File system at this location supports fcntl lockf file locking.

Mapping to the localhost

vbr does not support the special localhost name as a backup host. To back up a database node to its own disk, use empty square brackets for the hostname in the [Mapping] section of the configuration file.

[Mapping]
NodeName = []:/backup/path

Mapping to the Same Database

The following example shows how a [Mapping] section that specifies a single node to back up, v_vmart_node0001. The node is assigned to the backup host v_srv01 and the backup directory /home/dbadmin/backups. Although you are backing up a single node cluster, and the backup host and the database node are the same system, you specify them differently.

Specify the backup host and directory using a colon (:) as a separator:

[Mapping]
v_vmart_node0001 = srv01:/home/dbadmin/backups

Mapping to an Alternative Database

Before you can replicate objects to an alternative database, you must also create a [NodeMapping] section in your vbr configuration file. The NodeMapping section points source nodes to their target database nodes.

To restore an alternative database, add mapping information using the following format:

[Mapping]
targetNode: sourceDBNode_backuphost:sourceDB_backuppath

The [Mapping] section should look like this:

[Mapping]
v_sec_node0001 = pri_bsrv01:/archive/backup
v_sec_node0002 = pri_bsrv02:/archive/backup
v_sec_node0003 = pri_bsrv03:/archive/backup