Most of my notes, documents, projects, work is saved on the computer. Shit happens - computer get stolen, broken. Here is my setup to make simple, automatic, secure, cheap backups.
Tools
- Restic + resticprofile (most popular, my choice)
- Borg
- Kopia
List
What | Script | Period | Target |
---|---|---|---|
~/.ssh folder and other | resticprofile | Daily | Amazon S3 |
Home Assistant | HA | Daily | Amazon S3 |
Google Drive | ?? | Monthly | Amazon S3 |
iCloud | ?? | Monthly | Amazon S3 |
Obsidian | ?? | Monthly Real time Real time |
Amazon S3 iCloud Github |
Raycast | ?? | Monthly | Amazon S3 |
Restic
Setup restic, then setup resticprofile. Store env variables in some secure way.
Checklist
Run:
brew install restic
brew tap creativeprojects/tap
brew install resticprofile
restic snapshots
restic restore <restic_id> --target ~/Downloads
restic restore latest --target ~/Downloads
resticprofile --config restic-profiles.yaml --name 'default' backup
resticprofile --config restic-profiles.yaml --name 'default' schedule
resticprofile --config restic-profiles.yaml --name 'default' status
resticprofile --config restic-profiles.yaml --name 'default' backup
resticprofile --config restic-profiles.yaml --name 'default' check
Sample config:
version: "1"
default:
repository: "..."
initialize: true
env:
AWS_ACCESS_KEY_ID: "..."
AWS_SECRET_ACCESS_KEY: "..."
AWS_DEFAULT_REGION: "..."
RESTIC_PASSWORD: "..."
PATH: "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
backup:
source:
- "..."
schedule: "*:56"
schedule-permission: user
schedule-after-network-online: true
schedule-log: /Users/kamil/Backups/restic.log
retention:
after-backup: true
keep-within: 14d
prune:
before-backup: false
after-backup: true
keep-daily: 1
keep-hourly: 1
keep-weekly: 1
keep-monthly: 1
keep-within: 3h
global:
scheduler: crond
restic-binary: /opt/homebrew/bin/restic
Rclone
rclone copy --progress --s3-storage-class=STANDARD GoogleDrive:rsync s3:krudnicki-gdrive/test2
rclone copy GoogleDrive:/ s3:krudnicki-gdrive/2024-05-18-2 --transfers=16 --checkers=16 --fast-list --drive-chunk-size=64M --progress --s3-use-accelerate-endpoint=true --ignore-checksum
rclone ls s3-...:...-db-backups