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 backups.

List of things to backup

What Script Period Target
~/.ssh folder resticprofile Daily Amazon S3
Home Assistant Google Drive Daily Google Drive
Google Drive Amazon S3 Monthly
iCloud Amazon S3 Monthly
Obsidian Amazon S3
iCloud
Github
Monthly
Real time
Real time
Raycast
Keys

Instruction for Restic

Setup restic, then setup resticprofile. Store env variables in some secure way.
Sample resticprofile:

version: "1"
default:
  backup:
    source:
      - "..."
    schedule: daily
    schedule-priority: background
    schedule-lock-wait: 2h
    schedule-log: /Users/kamil/Documents/Apps/restic/profile-backup.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

Run:

cd ~/Documents/Apps/restic

restic snapshots
resticprofile backup
resticprofile schedule

launchctl setenv "ENV_VAR" "12345"
echo setenv ENV_VAR2 abc | launchctl

launchctl getenv PATH

chmod 777 profiles.yaml

Alternative using 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