Configure Data Repository for automated backups.
Follow these steps:
Note: In a cluster installation, you can log in to Data Repository from any of the three hosts that is participating in the cluster. However, we recommend logging in to the Data Repository host that will initiate the backups.
/opt/vertica/bin/vbr.py --setupconfig
Note: We recommend launching this command in the target directory for the configuration file. The Linux user account for the database administrator user must have privileges to write to that directory.
You are prompted to provide answers to various questions and statements. The list of questions and statements and a description of their typical answers are as follows:
Note: A restore point of 7 enables Data Repository to be restored to the most recent backup or to any of the previous 7 incremental backups. If the restore point is set to 1, you can only restore Data Repository to the most recent backup or to the previous incremental backup. The oldest backup is removed when the restore point limit is reached. To retain more than the restore point, increase the restore point or change the snapshot name in the configuration file. However, changing the snapshot name starts a new set of full backups, which can double the amount of disk space that is required for backups.
Note: This password must correspond to the database password for the database administrator account within Vertica.
Note: If you are backing up a cluster, you are prompted for the hostname that corresponds to each node in the cluster. You must back up each node in a cluster.
Note: If you are backing up a cluster, you are prompted for a backup directory for each node in the cluster. You must back up each node in a cluster.
Verify that you have write permissions to the directory where you are creating the .ini file. If you do not enter a full path to the .ini file, the file is saved to the directory where you ran the /opt/vertica/bin/vbr.py --setupconfig command.
Important: The configuration file that is generated contains a clear text password.
A message indicates that the vbr configuration has been saved to a configuration file named snapshot name.ini.
/opt/vertica/bin/vbr.py --task backup --config-file configuration_directory_path_filename
Indicates the directory path and filename of the configuration file you created previously. This file is located where you ran the backup utility (/opt/vertica/bin/vbr.py).
For example:
/opt/vertica/bin/vbr.py --task backup --config-file /home/vertica/vert-db-production.ini
If you are prompted about the authenticity of the host, answer yes.
Note: In a cluster installation, you only have to perform this step on one of the hosts that are participating in the cluster.
Data Repository is backed up.
dbPromptForPassword = True
dbPassword = password
Note: For automated backups, the dbPassword line must remain in the configuration file with a corresponding password. Set the dbPromptForPassword to False.
/opt/vertica/bin/vbr.py --task backup --config-file configuration_directory_path_filename
Indicates the directory path and filename of the configuration file you created previously. This file is located where you ran the backup utility (/opt/vertica/bin/vbr.py).
For example:
/opt/vertica/bin/vbr.py --task backup --config-file /home/vertica/vert-db-production.ini
For example:
/home/vertica/backup_script.sh
chmod 777 location_backup_script.sh/backup_script.sh
For example:
chmod 777 /home/vertica/backup_script.sh
crontab -e
Note: We suggest that you create a cron job to run the script daily at an off-peak time.
For example:
00 02 * * * /home/vertica/backup_script.sh >/tmp/backup.log 2>&1
This example cron job will run the backup script every day at 2:00 AM.
Important! The first time you back up Data Repository, a full backup is done. This full backup can take a considerable amount of time to complete, and depends on the amount of historical data that exists. Once an initial backup has been performed, subsequent scheduled backups will be incremental. In the case of a daily backup, an incremental backup will have to account for database activity that has occurred within the last 24 hours only (for example, amount of time that has passed since the last backup).
Copyright © 2015 CA Technologies.
All rights reserved.
|
|