Introduction
AllegroGraph supports online full backups. A full backup contains all data files and information required to restore a database to the state it was in near the time of the backup. Online backups are performed while the database is running.
The current backup and restore software has the following limitations:
The backup and restore scripts only operate against an individual triple stores. It does not back up the AllegroGraph server configuration, its logfiles, etc. It is the customer's responsibility to back up these other files.
The backup and restore scripts must be run by the user id under which the AllegroGraph server is running (commonly the
agraph
user).Only backup-to-disk is supported. All backup data is copied into a single output directory.
A restore must be performed to the same directories as the original database.
Performing an online full backup
su
to the user id under which the Allegrograph server is running (usually theagraph
user).Run the agraph-backup script with the appropriate arguments
Usage: /usr/bin/agraph-backup [ --port PORT] dbname destination-directory
dbname
is the name of the database. Use the --port
flag if your database server is running on a non-default port.
destination-directory
is the directory into which the data files will be copied. If the database does not exist, agraph-backup
will attempt to create it. WARNING If there are existing backup files in this directory, they will be overwritten, so be careful.
Performing a restore
Make sure that AllegroGraph server is running, but the triple store you want to restore is not open. This can be verified by running
ps uax | grep Agraph: | grep -v grep
. Any processes listed represent open databases. If need be, the processes should killed.Run the agraph-restore script with the appropriate arguments
Usage: /usr/bin/agraph-restore backup-directory
- Open the restored database. This may take a minute or so as AllegroGraph recovers data files back to a consistent state.
backup-directory
is the directory where the backup files were written by a prior agraph-backup
run.
agraph-restore
will copy all data files back to their original location.