Restic
Versioned Backup on Local Storage
Install
sudo apt install restic
sudo restic init -r /mnt/backup/restic ## enter password for new repository: ## enter password again: ## created restic repository c289e935f9 at /mnt/backup/restic
Backup
sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic backup /home
Confirmations
sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic snapshots
Restore
sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic restore latest --target /tmp/restore
Management
## Snapshot Retention Policy: sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune #sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune --dry-run sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic forget --keep-daily 21 --keep-weekly 12 --keep-monthly 36 --prune
## Remove Specific Snapshot: sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic snapshots sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic forget 35783b60 #sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic forget 35783b60 --dry-run sudo restic -p /etc/keys/restic.key -r /mnt/backup/restic prune
References
Acknowledgments
Daiphys is a professional services company in research and development of leading-edge technologies in science and engineering.
Get started accelerating your business through our deep expertise in R&D with AI, quantum computing, and space development; please get in touch with Daiphys today!
Daiphys Technologies LLC - https://www.daiphys.com/