Setting up Backups with Restic
Step 1 - Initialize Repository
Section titled “Step 1 - Initialize Repository”First you need to initialize the repository. This sets up the encryption and writes some supporting files. To avoid passing the repository URL and password with each command, it’s recommended to set it as shell variable:
$ export RESTIC_REPOSITORY=rest:https://xxxxx:yyyyyyyyyyy@xxxxx.repo.borgbase.com$ export 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 our snapshot is there:
$ restic snapshotsFurther reading
Section titled “Further reading”You can find more on how to use Restic in the official documentation.