This guide installs Restic and initializes a repository for encrypted backups.
sudo apt-get update
sudo apt-get install -y restic
export RESTIC_REPOSITORY="/srv/restic-repo"
export RESTIC_PASSWORD="change-me"
For production, use RESTIC_PASSWORD_FILE instead of plain environment variables.
restic init
restic backup /etc /srv/data
restic snapshots
restic check --read-data-subset=1/20
restic restore latest --target /tmp/restic-restore-test
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune