Vertica Analytics Platform Version 9.3.x Documentation

Viewing Backups

You can view backups in any of three ways:

  • Use vbr to  list the backups that reside on the local or remote backup host (requires a configuration file).
  • View historical information about backups using the DATABASE_BACKUPS systems table. Because the database_backups system table contains historical information, it is not updated when you delete the backups
  • Open the vbr log file to check the status of a backup. The log file resides on the node where you have run vbr, in the directory specified by the tempDir vbr configuration parameter. The default name of this directory is /tmp/vbr.

List Backups with vbr

To list backups on the backup hosts, use vbr --task listbackup with a specific configuration file. The following example shows how you can list backups, using a full backup configuration file, bak.ini:

dbadmin@doch01 ~]$ vbr --task listbackup --config-file /home/dbadmin/bak.ini

The vbr output information includes the following:

  • backup — The name of the generated backup. Vertica names the backup by combining the name of the vbr configuration file with a timestamp. Use the timestamp to identify an archive when you perform a restore.
  • backup_type — The type of the backup, either full or object.
  • epoch — The epoch when the backup was created.
  • objects — The objects being backed up. For a full backup, this field is blank.
  • nodes (hosts) — The hosts that received the backup and the database node names that provided the backups.
  • file_system_type — The storage location file system of the Vertica hosts that comprise this backup, either Linux or HDFS. For information on backing up HDFS hosts, refer to Backing Up HDFS Storage Locations .

The following example shows a list of full backups of a three node cluster to a single backup host, bkhost.

backup                backup_type  epoch   objects   nodes (hosts)                                                                  file_system_type
bak_20160414_134452   full         749               v_vmart_node0001(bkhost), v_vmart_node0002(bkhost), v_vmart_node0003(bkhost)   [Linux]
bak_20160413_174544   full         659               v_vmart_node0001(bkhost), v_vmart_node0002(bkhost), v_vmart_node0003(bkhost)   [Linux]

The listbackup task fails if you attempt to view backups on a cluster without a database when the backups were made to local hosts using the [] shortcut. Vbr requires a database to provide the location of the mapped local host.

Viewing All Backups in a Location

You can use the --list-all parameter with the listbackup task to view a list of all the snapshots stored on the hosts and paths listed in the specified configuration file.

dbadmin@doca01 ~]$ vbr --task listbackup --list-all --config-file /home/dbadmin/Nightly.ini

The following example shows a --list-all task using the configuration file Nightly.ini. That configuration file references the hosts doca01, doca02, and doca03 and the path /vertica/backup. The output shows that these locations contain not just the backups created using Nightly, but also backups created using a configuration file called Weekly.ini.

backup                   backup_type  epoch  objects      nodes(hosts)                                        file_system_type 
Weekly_20170508_183249   full         3449                vmart_1(doca01), vmart_2(doca01), vmart_3(doca01)   [Linux]          
Weekly_20170508_182816   full         2901                vmart_1(doca01), vmart_2(doca02), vmart_3(doca03)   [Linux]          
Weekly_20170508_182754   full         2649                vmart_1(doca01), vmart_2(doca02), vmart_3(doca03)   [Linux]          
Nightly_20170508_183034  object       1794   sales_schema vmart_1(doca01), vmart_2(doca02), vmart_3(doca03)   [Linux]          
Nightly_20170508_181808  object       1469   sales_schema vmart_1(doca01), vmart_2(doca02), vmart_3(doca03)   [Linux]          
Nightly_20171117_193906  object       173    sales_schema vmart_1(doca01), vmart_2(doca02), vmart_3(doca03)   [Linux]  				

You can also use the the --json and --list-output-file parameters with the listbackup task to output the same content in JSON delimited format to a display or to an output file. For more information, refer to vbr Reference.

Query database_backups

Use the following query to list historical information about backups. The objects column lists which objects were included in object-level backups. Do not use the backup_timestamp value when restoring an archive. Instead, Use the values provided by vbr --task listbackup, when restoring an archive.

VMart=> SELECT * FROM v_monitor.database_backups;
-[ RECORD 1 ]----+------------------------------
backup_timestamp | 2013-05-10 14:41:12.673381-04
node_name        | v_vmart_node0003
snapshot_name    | schemabak
backup_epoch     | 174
node_count       | 3
file_system_type | [Linux] 
objects          | public, store, online_sales
-[ RECORD 2 ]----+------------------------------
backup_timestamp | 2013-05-13 11:17:30.913176-04
node_name        | v_vmart_node0003
snapshot_name    | kantibak
backup_epoch     | 175
node_count       | 3
file_system_type | [Linux] 
objects          | 
-[ RECORD 13 ]---+------------------------------
backup_timestamp | 2013-05-16 07:02:23.721657-04
node_name        | v_vmart_node0003
snapshot_name    | objectbak
backup_epoch     | 180
node_count       | 3
file_system_type | [Linux] 
objects          | test, test2
-[ RECORD 14 ]---+------------------------------
backup_timestamp | 2013-05-16 07:19:44.952884-04
node_name        | v_vmart_node0003
snapshot_name    | table1bak
backup_epoch     | 180
node_count       | 3
file_system_type | [Linux] 
objects          | test
-[ RECORD 15 ]---+------------------------------
backup_timestamp | 2013-05-16 07:20:18.585076-04
node_name        | v_vmart_node0003
snapshot_name    | table2bak
backup_epoch     | 180
node_count       | 3
file_system_type | [Linux] 
objects          | test2