Skip to content

How to back up critical paths with restic

restic 0.16.4 is installed. Off-site repository setup is operator-specific (B2/S3/SFTP). Replace $REPO with your repository.

Critical paths

PathService
~/nextcloud/data/, ~/nextcloud/db/, ~/nextcloud/config/Nextcloud
n8n named volume / data dirn8n
~/radicale/data/, ~/radicale/config/Radicale
~/puter/instanceN/puter/data/, config, .envHeyPuter ×4
/etc (also tracked by etckeeper)System

Example commands

bash
export RESTIC_REPOSITORY="$REPO"
# export RESTIC_PASSWORD=...   # from Vaultwarden, not shell history if avoidable

restic backup ~/nextcloud/data ~/nextcloud/config ~/nextcloud/db --tag nextcloud

for i in 1 2 3 4; do
  restic backup ~/puter/instance$i/puter/data ~/puter/instance$i/puter/config \
    ~/puter/instance$i/.env --tag "puter-instance$i"
done

restic backup /etc --tag system
restic snapshots

Before DB file backups, prefer a pg_dump of Nextcloud DB for cleaner restores (restore guide).

Restore smoke test

bash
restic restore latest --target /tmp/restore-test --tag nextcloud
ls -la /tmp/restore-test

Northeast Systems · Aux Server · Infra Server