Skip to content

Instantly share code, notes, and snippets.

@stvhay
stvhay / backup.sh
Last active November 11, 2022 01:20 — forked from skrajewski/backup.sh
Automate your macOS backup to Backblaze B2 using Restic and launchd.
#!/bin/bash
log () { echo "$(date +"%Y-%m-%d %T") " "$@"; }
home_dir='' # FILL THIS OUT
name='remote'
restic_path='/opt/homebrew/bin' # ADJUST AS NEEDED
pid_file="${home_dir}/.restic/${name}.pid"
timestamp_file="${home_dir}/.restic/${name}.timestamp"
hc_ping="https://hc-ping.com/uuid_here" # REPLACE WITH YOUR UUID