Setting Up Backups With Restic
Restic sends backups to BorgBase over HTTPS and authenticates with a username and password, which are part of the repository URL. Before you start, create a repository with the Restic format and copy its URL from the BorgBase control panel. It starts with rest:https://.
Step 1 – Initialize Repository
Section titled “Step 1 – Initialize Repository”First you need to initialize the repository. This sets up encryption and writes supporting files. To avoid passing the repository URL and password with each command, set them as shell variables:
export RESTIC_REPOSITORY=rest:https://xxxxx:yyyyyyyyyyy@xxxxx.repo.borgbase.comexport RESTIC_PASSWORD=mysecretTo initialize the repository:
restic initStep 2 – First Snapshot
Section titled “Step 2 – First Snapshot”Restic calls each backup run a “snapshot”. It is the state of a specific folder at a specific time. To take a snapshot of folder /var:
restic backup /varVerify that your snapshot is there:
restic snapshotsNext Steps
Section titled “Next Steps”- Verify that your backups are working.
- Try a test restore.
Further Reading
Section titled “Further Reading”You can find more on how to use Restic in the official Restic documentation.