config/restic
2020-04-17 01:03:15 +02:00
..
crontab Add nextcloud, backup, and ssh setup 2020-04-17 01:03:15 +02:00
README.md Add nextcloud, backup, and ssh setup 2020-04-17 01:03:15 +02:00

Restic backups

Download binary: https://github.com/restic/restic/releases/latest

REPO=sftp:backup-user@example.com:repo

bunzip2 restic*.bz2
sudo cp restic* /usr/local/bin/restic

echo 'nice /usr/local/bin/restic -r' "$REPO" '-p /root/backup-key "$@"' | sudo tee /root/restic-cmd
sudo chmod +x /root/restic-cmd

cat /dev/urandom | base64 | head -c 64 | sudo tee /root/backup-key
sudo chmod 600 /root/backup-key

sudo /root/restic-cmd init
sudo crontab crontab