Creating vbr Configuration Files

The vbr utility uses a configuration file for the information required to back up and restore a full- or object-level backup or copy a cluster. You cannot run vbr without a configuration file because no default file exists. You can, however:

Note: You must be logged on as the database administrator, not root, to create the vbr configuration file.

Start the vbr Configuration Script

To create a configuration file, enter this command:

> /opt/vertica/bin/vbr --setupconfig

The script prompts you to answer several questions, as shown in the following summarized example: 

[dbadmin@localhost ~]$ /opt/vertica/bin/vbr --setupconfig 
Snapshot name (backup_snapshot): fullbak1 
Number of restore points (1): 3 
Specify objects (no default): 
Object restore mode (coexist, createOrReplace or create) (createOrReplace): 
Vertica user name (dbadmin): 
Save password to avoid runtime prompt? (n) [y/n]: y 
Password to save in vbr config file (no default): 
Node v_vmart_node0001 
Backup host name (no default): 194.66.82.11 
Backup directory (no default): /home/dbadmin/backups 
Config file name (fullbak1.ini): 
Password file name (no default value) (no default):pwdfile 
Change advanced settings? (n) [y/n]: n 
Saved vbr configuration to fullbak1.ini. 
Saved vbr database password to pwdfile.ini.

For further information on how to answer these questions, see:

See the following instructions to complete the questions in the configuration script:

Specify a Backup Name

Specify the name of the backup for vbr to create:

Snapshot name (backup_snapshot):
        

You must provide a name for the backup that clearly identifies the specific backup. The backup name is used in the directory tree structure that vbr creates for each node. Because Vertica automatically augments the backup subdirectories with date and time indicators, do not add dates to the backup name.

Create different configuration files with specific backup names for full and object-level backups, but use the same backup directory for both types of backups. For example, the configuration file for a full database backup, namedfullbak.ini , has these snapshotName and backupDir parameter values:

snapshotName=fullbak
backupDir=/home/dbadmin/data/backups

The configuration file for the object-level backup, namedobjectbak.ini, has these parameter values:

snapshotName=objectbak
backupDir=/home/dbadmin/data/backups

Specify Restore Points

Specify how many backups to save as a number of restore points: 

Number of restore points (1):

The default value is 1, indicating that vbr always retains one additional restore point.

Saving multiple restore points gives you the option to recover from one of several backups. For example, if you specify 3, you have 1 current backup, and 3 backup archives. Vertica stores the value you enter as the restorePointLimit parameter in the vbr configuration file.

Specify Object Restore Mode

Specify how Vertica should handle restored objects, as this example shows: 

Object restore mode (coexist, createOrReplace or create) (createOrReplace):

Vertica supports the following object restore modes:

In all modes, Vertica restores data with the current epoch. Object restore mode settings do not apply to backups and full restores.

Specify Full or Object-Level Backups

Indicate whether you want to create a full- or object-level backup: 

Specify objects (no default):

Enter the User Name

Enter the user name of the person who invoking vbr

Vertica user name (dbadmin):

Note: This user name must be the user identified as the database administrator for the entire database. No other user has permission to invoke this action, even if the user has dbadmin permissions within portions of the database.

Save the Account Password

Specify whether vbr prompts for an account password at run time: 

Save password to avoid runtime prompt? (n) [y/n]:

Press Enter to accept the default (n) and continue. Because you are not saving the password, you must enter it when you run vbr.

To save your password to a password configuration file, enter y. The utility prompts for you to enter the password but does not display the text as you type:

Save password to avoid runtime prompt? (n) [y/n]:

The parameter name in the configuration file that indicates whether to prompt for a password is dbPromptForPassword.

Specify the Backup Host and Directory

Vbr lists each node name for your cluster. Enter the backup host name and directory for each cluster node at the prompts:

Node v_vmart_node0001
Backup host name (no default):
Backup directory (no default): 

No defaults exist for either the host name or the backup directory.

In the configuration file, all cluster nodes appear listed by name under the [Mapping] section. Each cluster node contains a line that includes the cluster node, backup host, and backup directory location:

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

Save the Configuration File

To save the configuration file with its default name, enter a configuration file name of your choice, or press (Enter:

Config file name (fullbak.ini):

The default name consists of:

The vbr utility confirms that it saved the file:

Saved vbr configuration to fullbak.ini.

By default, Vertica saves the file in the current working directory. You can include a fully qualified or relative path to save the configuration file to an alternate location.

Note: The backup configuration file is typically stored on the cluster you are backing up. Therefore, Micro Focus recommends that you also save a copy of the configuration file on the backup host. If you do so, the configuration file remains available, even if the cluster node is lost.

Continue to Advanced Settings

To continue with advanced configuration settings, enter y:

Change advanced settings? (n) [y/n]:

To continue without advanced settings and save the configuration file with the information you just entered, press Enter.

Changing the objectRestoreMode Parameter Value

After you create the configuration file, you can also specify an objectRestoreMode parameter. The objectRestoreMode parameter is associated only with restoring object-level backups.

Related Tasks