config/restic/README.md

29 lines
516 B
Markdown

# Restic backups
Download binary:
https://github.com/restic/restic/releases/latest
```sh
REPO=sftp:backup-user@example.com:repo
bunzip2 restic*.bz2
sudo cp restic* /usr/local/bin/restic
sudo cp restic-* /usr/local/bin
sudo sed -i s/REPO/$REPO/ /usr/local/bin/restic-repo
cat /dev/urandom | head -c 48 | base64 | sudo tee /etc/restic-key
sudo chmod 600 /etc/restic-key
sudo restic-repo init
```
## `sudo crontab -e`
```
PATH=/usr/local/bin:/usr/bin:/bin
48 * * * * restic-backup
18 2 * * * restic-forget
```