Infraista DocsDocs
Data & storageBackup Storage

Back up with rsync, BorgBackup and restic

Send scheduled backups to a storage box with rsync over SSH, deduplicated and encrypted BorgBackup repositories, or restic over SFTP, with ready-to-run commands.

Storage boxes work with the backup tools you already use. Set up an SSH key first so scheduled runs don't need a password.

In the examples, replace u100001 and sb100001.backup.infraista.cloud with your username and host. The box's Access & protocols tab shows the same commands with your values filled in.

rsync

rsync sends only the files that changed. It runs over SSH on port 23; turn on rsync over SSH on Access & protocols.

rsync -avz --progress -e 'ssh -p 23' ./projects/ u100001@sb100001.backup.infraista.cloud:projects/

Add --delete to mirror deletions too.

BorgBackup

BorgBackup makes deduplicated, encrypted, versioned backups. It uses the same SSH service as rsync, so the rsync over SSH switch turns it on.

Create the repository once:

borg init --encryption=repokey ssh://u100001@sb100001.backup.infraista.cloud:23/./borg/main

Then back up on a schedule (cron or a systemd timer):

borg create --stats ssh://u100001@sb100001.backup.infraista.cloud:23/./borg/main::{hostname}-{now} ~/projects
Keep the repokey passphrase safe. Without it, the backups can't be read, by you or by us.

restic

restic makes encrypted, deduplicated backups over SFTP, so it works on every plan whenever SFTP is on.

export RESTIC_REPOSITORY=sftp:u100001@sb100001.backup.infraista.cloud:/restic/main
restic init          # once
restic backup ~/projects

For scheduled runs, keep the repository password in a file or a secret manager (for example with RESTIC_PASSWORD_FILE). If your box's SFTP port isn't 22, the Access & protocols tab shows the extra option to add.

Check your backups

  • The box's Overview shows how much is stored and a 30-day chart of stored data.
  • Snapshots keep point-in-time copies of the whole box, including your Borg and restic repositories.

On this page