Skip to content

Restoring Files From a Restic Backup

To restore files from a Restic backup, you need two things:

  • The repository URL: Copy this from the BorgBase control panel. It starts with rest:https://.
  • The repository password: This is the same password used to initialize the repository and for subsequent backups. BorgBase has no knowledge of it and can’t help recover it, so keep it in a safe place.

To avoid having to enter the repository URL and password with each command, set them as shell variables:

Terminal window
export RESTIC_REPOSITORY=rest:https://xxxxx:yyyyyyyyyyy@xxxxx.repo.borgbase.com
export RESTIC_PASSWORD=mysecret

Then list snapshots:

Terminal window
restic snapshots

Note the ID of the snapshot you want to restore and proceed to the next step.

To download files from a backup:

Terminal window
restic restore 99999999 --target /tmp/restore-work

You can find more on how to restore files in the official Restic documentation.