
A Production-Ready Linux Backup Pipeline with restic + systemd timers
Backups are only useful if they are automated, verifiable, and restorable . In this guide, you’ll build a practical backup pipeline on Linux using: restic for encrypted, deduplicated backups systemd services + timers for scheduling and reliability retention + prune + check for long-term maintenance a restore drill so you know recovery actually works I’ll use Debian/Ubuntu examples, but this works on any modern Linux distro with systemd. 1) Install restic # Debian/Ubuntu sudo apt update sudo apt install -y restic # Verify restic version 2) Create a repository and credentials (securely) We’ll use a local path as the repository in this example ( /srv/restic-repo ). You can later swap this to S3/B2/SFTP/etc. sudo mkdir -p /srv/restic-repo sudo chmod 700 /srv/restic-repo # Create password file (root-only) sudo install -m 600 /dev/null /etc/restic/passphrase sudo sh -c 'printf "%s\n" "REPLACE_WITH_A_STRONG_RANDOM_PASSWORD" > /etc/restic/passphrase' Create an environment file for restic: sudo
Continue reading on Dev.to DevOps
Opens in a new tab




