Platform/OS
Linux, macOS, Windows
Category
Backup & Recovery

Restic

Restic is a simple and fast backup program that creates secure copies of your important files and folders. It takes a snapshot of everything you choose, compresses it, and stores it safely so you can restore your data if your computer crashes, gets stolen, or you accidentally delete something. It uses S3-compatible object storage like a giant, reliable digital warehouse in the cloud to keep your backups off your local machine. This means your files are protected even if your house burns down, and you can access them from anywhere with an internet connection. Because S3 storage is cheap, scalable, and durable, Restic lets regular people enjoy enterprise-grade backups without needing expensive servers or complicated setups.

Connection / Setup

  1. Create an account and log in to DiskSpace
  2. Click I'm ready to set up my storage
  3. Enter Bucket Name following the instructions
  4. Click Create Bucket and wait for it to be generated
  5. Find your Endpoint URL, Access Key, and Secret Key in the S3 Client Configuration section for use below

Connecting Restic to DiskSpace.sh (S3-compatible storage)

Follow these steps to configure Restic with your DiskSpace.sh S3-compatible bucket. DiskSpace.sh is fully S3 API compatible and requires path-style addressing.

Step-by-step Configuration
  1. Install the latest version of Restic on your system.
  2. Set the following environment variables using the credentials provided by DiskSpace.sh:
Access Key
ACCESS_KEY_ID=your_access_key
Secret Key
SECRET_ACCESS_KEY=your_secret_key
Endpoint URL
https://s3.diskspace.sh
Recommended Restic Command
export AWS_ACCESS_KEY_ID="your_access_key"
export AWS_SECRET_ACCESS_KEY="your_secret_key"
export RESTIC_REPOSITORY="s3:https://s3.diskspace.sh/your-bucket-name"

restic init
Path Style Requirement: DiskSpace.sh requires path-style requests (e.g. https://s3.diskspace.sh/bucket-name/). Restic automatically uses path-style when the endpoint contains the hostname as shown above. Do not use virtual-hosted style (bucket.s3.diskspace.sh).
Additional Environment Variables (Optional)
export AWS_DEFAULT_REGION="us-east-1"
export AWS_ENDPOINT_URL="https://s3.diskspace.sh"
Troubleshooting
  • If you receive "NoSuchBucket" or "Authorization" errors, verify your bucket name and that you are using path-style URLs.
  • Leave the region empty or set it to us-east-1 unless DiskSpace.sh specifically instructs otherwise.
  • Use --no-check-certificate only if you encounter SSL issues in test environments.
  • Run restic snapshots after initialization to verify connectivity.
Success: Once initialized, you can run regular backups with restic backup /path/to/data.