In this guide, you will learn how to set up Restic and connect it to our Object Storage. Restic is a powerful backup tool that is ideal for backing up data to S3-compatible storage.
Download Restic:
Download Restic from the official website:
Restic Downloads
Install Restic:
Follow the installation instructions for your operating system (Windows, macOS, Linux).
Verify Installation:
Open a terminal or command prompt and verify the installation with:
restic version
Set Environment Variables:
Set the environment variables for your access credentials:
export AWS_ACCESS_KEY_ID="YOUR_ACCESS_KEY"
export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_KEY"
export RESTIC_REPOSITORY="s3:https://a1.storagecenter.ch/your-bucket-name"
export RESTIC_PASSWORD="YOUR_REPOSITORY_PASSWORD"
YOUR_ACCESS_KEY
and YOUR_SECRET_KEY
with your access credentials.your-bucket-name
with the name of your bucket.YOUR_REPOSITORY_PASSWORD
with a secure password for your Restic repository.Initialize Repository:
Initialize the Restic repository with:
restic init
Create a Backup:
Create a backup of a local directory with:
restic backup /path/to/local/directory
Check Backup Status:
Display a list of all snapshots:
restic snapshots
Restore a Backup:
Restore a backup to a local directory:
restic restore <Snapshot-ID> --target /path/to/local/target
<Snapshot-ID>
with the ID of the snapshot you want to restore.Verify Restored Files:
Verify that the files have been restored correctly.
Set Backup Policies:
Keep the last 5 snapshots:
restic forget --keep-last 5
Check Repository Integrity:
Check the integrity of the repository:
restic check
Delete Repository:
Delete the repository (Caution: This will delete all data!):
restic forget --prune
Reconnect to Repository:
Reconnect to the repository by setting the environment variables again:
export AWS_ACCESS_KEY_ID="YOUR_ACCESS_KEY"
export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_KEY"
export RESTIC_REPOSITORY="s3:https://a1.storagecenter.ch/your-bucket-name"
export RESTIC_PASSWORD="YOUR_REPOSITORY_PASSWORD"
With this guide, you have successfully installed Restic, connected it to your Storagecenter bucket, and created your first backups. You can now perform regular backups and restore data as needed.
For more information, consult the official Restic documentation:
Restic Documentation
restic version
: Displays the installed version of Restic.restic init
: Shows the initialization of the repository.restic backup
: Shows the creation of a backup.restic restore
: Shows the restoration of a backup.