Backing up your InfiniteGraph database is recommended to recover from catastrophic events like disk failure, and from logical or physical corruptions. This documents goes over some basic backup and restore tasks using the oobackup and oorestore tools.
InfiniteGraph allows full read and write access during the backup process. However, during a restore, only the federated database is locked until the entire restore is completed. A typical backup strategy involves a full backup followed by periodic incremental and subincremental backups. These backup levels can also be used to specify a point of restore.
- Full - The entire database is backed up.
- Incremental - All modified data since the last full backup.
- Subincremental - All modified data since the most recent incremental backup.
A backup set is a logical grouping of a single full backup, and any incremental and subincremental backups that are based on it.
Performing a Backup
The basic way to back up a federated database is to:
1. Run oocleanup to ensure that locks left by any incomplete transactions are released.
2. Run oobackup with an option specifying the backup level (-full, -incremental, or -subincremental), the -destination option specifying the directory for the backup files, and the backupBootFilePath for the federated database
Example 1: Performing a full backup
oobackup -full -destination /backups /data/InfiniteGraph/TestGraph.boot
Example 2: Performing an incremental backup after the full backup
oobackup -incremental -destination /backups /data/InfiniteGraph/TestGraph.boot
Performing a Restore
There are a few ways to perform a restore. One is to specify a timestamp as a point of restore:
oorestore -time 200102060330 -source /backups -newhost machine42 -newdirectory /mnt/newloc TestGraph.boot
The second is to restore a particular volume from a particular backup set. See the oocreateset command for creation of a custom backup set.
This command restores the mfgFd federated database from the Monday backup, which is a member of the dailyBackups backup set. The restored files are placed on the hosts and directories from which they were archived.
oorestore -set dailyBackups -backup Monday -volume fdbVol -device /backups TestGraph.boot
This command restores the same federated database as the previous command, but restores it to the directory /mnt/newloc on host machine42.
oorestore -set dailyBackups -backup Monday -volume fdbVol -device /backups -newhost machine42 -newdirectory /mnt/newloc TestGraph.boot
Visit our new developer Wiki for details on all tools