This section describes the relevant parts in the Administrator’s Guide for the Vertica Analytic Database that you need to refer to for more details on maintaining the database. All of the following sections are located in the Operating the Database chapter of the Administrator’s Guide for the Vertica Analytic Database.
Partition tables in the database.
You can partition data tables in the Vertica database, which devides one large table into smaller tables. This can optimize query performance by utilizing parallel performance of the disks in which the table partitions reside.
For more details on recovering the database, refer to Partitioning Tables in the Administrator’s Guide for the Vertica Analytic Database.
You can recover the database to a functional state after at least one node in the system fails.
For more details on recovering the database, refer to Recovering the Database in the Administrator’s Guide for the Vertica Analytic Database.
Back up or restore data in the database.
You can back up or restore data in the database using full backups or incremental backups. You can use backups to recover a previous version
You can back up or restore data in the database using full backup or incremental backup scripts.
Following are some of the important points that you have to remember before proceeding to back up your files:
Make sure you have installed rsync 3.0 or later on the databse nodes. You can use rsync --version to check the version.
Check the disk space in every vertica nodes and make sure that the backup directory has enough space.
The backup.sh script works only if the database is up and running. You can use admin tools in Vertica to check the database status.
It is important to note the snapshot name used by the backup.sh script for use in restore operations.
It is recommended to do a full backup at least once a week and incremental backup every other day.
You can either use cold backup or hot backup to back up all the data on the drive.
Cold backup—this is an offline backup. Make sure that the database is down before you copy all data to a backup directory.
Hot backup—this is a dynamic backup. Vertica provides a utility to perform full backup called backup.sh.
For more information on backing up or restoring data in the database, refer to Backup and Restore in the Administrator’s Guide for the Vertica Analytic Database
You can do an incremental backup to back up files that have changed or are new since the last incremental backup. This method takes less time to back up data comapred to full backup.
Do a hot backup first. Vertica creates a snapshot file. This file is found in the location where you set -B parameter while you use backup.sh to full backup your database.
Do the incremental backup, you can also use backup.sh in Vertica($vertica_top/scripts/). You must specify the snapshot file that was created by full backup. Refer to Backup and Restore in the Administrator’s Guide for the Vertica Analytic Database for more details.
You can write a script to run incremental backup every other day. For example, /opt/Vertica/scripts/backup.sh –s host1,host2,host3 –i host1 –b host1 –B /backupDir –D /vdata/pa8 –d pa8 –u dbadmin –w dbadmin –S backup1
This creates a backup from a 3 nodes system and is run from host1 and initialized by host1 and the backup is stored under /backupDir.
ollowing are some of the important points to note before restoring your files:
The backup must have been created using the backup.sh script. It is important to note the snapshot name used by the backup.sh script for use in restore operations.
By default, restore.sh does not restore the vertica.conf file. This is useful if you have modified the database configuration since the database was backed up. Use the restore.sh script with the -c switch to restore the vertica.conf file.
Make sure that you shutdown the database before running the restore script.
Use restore.sh (/opt/vertica/scripts) script to restore the database from the backup created by backup.sh.
For example, /opt/Vertica/bin/restore.sh –s host1,host2,host3 –b host1 –B /backupDir –D /vdata/pa8 –S backup1
This restores snapshot backup1 to a 3 node system from backup directory /backupDir from backup host, host1.