Creating Hard-Link Local Backups
Before creating a full hard-link local database backup, verify the following:
- Your database is running. All nodes need not be up in a K-safe database for
vbr
to run. However, be aware that any nodes that are DOWN are not backed up. - The user account that starts the utility (
dbadmin
or other) has write access to the target backup directories.
When you create a full or object-level hard link local backup, that backup contains the following contents.
Backup | Catalog | Database files |
---|---|---|
Full backup |
Full copy |
Hard-file links to all database files |
Object-level backup |
Full copy |
Hard-file links for all objects listed in the configuration file, and any of their dependent objects |
Run the vbr
script from a terminal using the database administrator account from a node in your database cluster. You cannot run the utility as root
.
To create a full or object-level backup, enter the following command:
> /opt/vertica/bin/vbr --task backup --config fullbak.ini
Note: While not required, OpenText recommends that you first create a full backup before creating any object-level backups.
Common Errors in Specifying the Hard-Link Local Backup Location
When you specify the hard-link backup location, be sure to avoid these common errors when adding the hardLinkLocal=True
parameter to the configuration file:
If ... | Then... | Solution |
---|---|---|
You specify a backup directory on a different node |
|
Change the configuration file to include a backup directory on the same host and file system as the database and catalog files. Then, run the backup utility again. |
You specify both of the following:
|
Performs backup by copying the files on the node from one file system to the other. |
No action required. No action required. |
Creating Hard-Link Local Backups for Tape Storage
You can use hard-link local backups as a staging mechanism to backup to tape or other forms of storage media. You can also use the hard-link local backup to restore the hard file links to the database files.
The following steps present a simplified approach to saving, and then restoring, hard-link local backups from tape storage:
-
Create a configuration file using a command such as:
/opt/vertica/bin/
vbr --
setupconfig - Edit the configuration file (
localbak.ini
in this example) to include thehardLinkLocal=True
parameter in the[Transmission]
section. -
Run the backup utility with the configuration file:
/opt/vertica/bin/vbr --task backup --config-file localbak.ini
- Copy the hard-link local backup directory with a separate process (not
vbr
) to tape or other external media. - If the database becomes corrupted, create the directory structure that existed when you created the hard-link local backup.
- Transfer the backup files from tape to their original backup directory.
-
Using the configuration file you used to create the hard-link local backup (Step 3), restore the database using the following command:
/opt/vertica/bin/vbr
--task restore --config-file localbak.iniWhen you restore from a hard-link local backup (copied from tape),
vbr
creates hard links from the backup files to the database directory, if possible. This approach saves significant disk space and time.