Gigaquad VPS Backup Documentation
Gigaquad uses the open-source Borgbackup tool to automatically create encrypted backups of your entire VPS filesystem. Backups are stored in at least two geographically distinct locations and retained for up to 9 months.
This documentation details how to query and restore backups on your VPS using Gigaquad's gq-borg.sh CLI.
Summary / TL;DR
-
- Use the sudo command to run as root e.g.
sudo gq-borg.sh list GQ_BB_REPO1. - Add the tag GQ_BB_REPO1 to the appropriate BorgBackup argument to select the primary repository.
- Use the sudo command to run as root e.g.
-
List available backup archives
bash gq-borg.sh list GQ_BB_REPO1 -
List all files in a backup archive
bash gq-borg.sh list GQ_BB_REPO1::2020-01-01 -
Extract all files from a backup archive
bash gq-borg.sh extract GQ_BB_REPO1::2020-01-01 -
Extract individual files from a backup archive
bash gq-borg.sh extract GQ_BB_REPO1::2020-01-01 example/file/path/in/archive.txt -
Get detailed information about a backup archive
bash gq-borg.sh info GQ_BB_REPO1::2020-01-01
IMPORTANT: Prerequisites
Before executing any of the commands contained in this documentation, consider the following.
a) Run as the correct user :
Backups are owned and maintained by the root user, you must run the gq-borg.sh script as root. To do this, use the sudo command to e.g. sudo gq-borg.sh list GQ_BB_REPO1
b) Selecting a backup repository :
Backups are stored in at least two geographically distinct locations, gq-borg.sh script stores the URLs for the BorgBackup repositories. Special tags placed in the command arguments will be substituted with the appropriate URL:
- To select the primary backup repository add the tag GQ_BB_REPO1 to the appropriate BorgBackup argument e.g.
gq-borg.sh list GQ_BB_REPO1::2020-01-01. - To select the secondary backup repository add the tag GQ_BB_REPO2 to the appropriate BorgBackup argument e.g.
gq-borg.sh list GQ_BB_REPO2::2020-01-01.
List available backup archives
To view the backup archives available in a repository, run:
gq-borg.sh list GQ_BB_REPO1
List all files in a backup archive
To view the files contained in a backup archive without restoring, run:
gq-borg.sh list GQ_BB_REPO1::2020-01-01
Notes :
2020-01-01at the end of the command is the name of the archive - change this to the name you are interested in. A list of available archives can be found by running the command above.
Extract all files from a backup archive
To extract/restore all the files contained in a backup archive, run:
gq-borg.sh extract GQ_BB_REPO1::2020-01-01
Notes :
2020-01-01at the end of the command is the name of the archive, change this to the name you are interested in. A list of available archives can be found by running the command above.
Extract individual files from a backup archive
To extract/restore individual file(s) contained in a backup archive, run:
gq-borg.sh extract GQ_BB_REPO1::2020-01-01 example/file/path/in/archive.txt
Notes :
-
example/file/path/in/archive.txtat the end of the command is the file path in the backup archive. A list of files in the archive can be obtained using the command above. -
2020-01-01at the end of the command is the name of the archive, change this to the name you are interested in. A list of available archives can be found by running the command above.
Get detailed information about a backup archive
To get detailed information about an archives size and how it was created, run:
gq-borg.sh info GQ_BB_REPO1::2020-01-01
Notes :
2020-01-01at the end of the command is the name of the archive, change this to the name you are interested in. A list of available archives can be found by running the command above.
Accessing the secondary backup server
The variable GQ_BB_REPO1 refers to the borg backup repository on the primary backup server. Every VPS has at least two locations it sends backups to. Use GQ_BB_REPO2 to access the secondary backup sever.