Creating Full Backups
Before you create a database backup, verify the following:
- You have prepared your backup directory with the vbr -init task.
- Your database is running. It is unnecessary for all nodes to be up in a K-safe database. However, any nodes that are DOWN are not backed up.
- All of the backup hosts are up and available.
- The backup host (either on the database cluster or elsewhere) has sufficient disk space to store the backups.
- The user account of of the user who starts the utility has write access to the target directories on the host backup location. This user can be the
dbadmin
or another assigned role. However, you cannot run the utility as root. - Each backup has a unique file name.
- If you are backing up an Eon Mode database, you have met the Requirements for Eon Mode Databases.
Run the vbr
script from a terminal. Use the database administrator account from an initiator node in your database cluster.
Running vbr Without Optional Commands
You can run the vbr
using only its required commands:
--task backup
--config-file config_file
If your configuration file does not contain the database administrator password, vbr
prompts you to enter the password. However, it does not display what you type.
The utility requires no further interaction after you invoke it.
To run the vbr
utility:
Use the --task backup
and --config-file
filename directives as shown in this example:
[release@qco55srv01:/scratch_b/qa/vertica/QA/VT_Scenario 0]$ vbr -t backup --config $FULLBAK_CONFIG Starting backup of database VTDB. Participating nodes: v_vmart_node0001, v_vmart_node0002, v_vmart_node0003, v_vmart_node0004. Snapshotting database. Snapshot complete. Approximate bytes to copy: 2315056043 of 2356089422 total. [==================================================] 100% Copying backup metadata. Finalizing backup. Backup complete!
By default, no output appears, other than the progress bar. To include additional progress information, use the --debug
option, with a value between 1–3.
If the utility does not locate the configuration you specify, it searches for one at opt/vertica/config/vbr.ini. If no file exists,the backup fails with an error.
Best Practices for Creating Backups
When creating backup configuration files:
- Create separate configuration files to create full- and object-level backups.
- Use the same backup host directory location for both kinds of backups:
- Because the backups share disk space, they are compatible when performing a restore.
- Each cluster node must also use the same directory location on its designated backup host.
- For best network performance, use one backup host per cluster node.
- Use one directory on each backup node to store successive backups.
- For future reference, append the major Vertica version number to the configuration file name (
mybackup
7x).
The selected objects of a backup can include one or more schemas or tables, or a combination of both. For example, you can include schema S1
and tables T1
and T2
in an object-level backup. Multiple backups can be combined into a single backup. A schema-level backup can be integrated with a database backup (and a table backup integrated with a schema-level backup, and so on).
Incremental Backups
Each time you back up your database with the same configuration file, vbr
creates an incremental backup. This incremental backup copies new storage containers, which can include:
- Data that existed the last time you performed a database backup
- New and changed data since the last full backup
You can configure the restorePointLimit
parameter to increase the number of stored backups.
vbr Process for Deleting Backups
Running the vbr
utility with the --task backup
command deletes the oldest backup. This command run whenever the total number that exist exceeds the restorePointLimit
value in the configuration file. Suppose the restorePointLimit = 5
, and five archives exist. In this case, running the vbr --task backup
utility again deletes the backup with the oldest date_timestamp, when vbr completes the current backup command.
When you invoke vbr
to create a backup:
- The utility obtains the value of the
restorePointLimit
parameter value to determine how many backups should exist in the archive. - If creating the next backup exceeds the restore point limit,
vbr
deletes the oldest archived backup. vbr
continues processing and initially creates the backup on the database cluster.- When the new backup is complete,
vbr
copies it from the database cluster to the designated backup location. - After the new backup is successfully copied to the backup location,
vbr
removes the backup from the database cluster.