From eb4a21491e8222694ca232c16f6e9e655f0ef3f6 Mon Sep 17 00:00:00 2001 From: type-two Date: Sun, 5 Jul 2026 12:32:10 +1000 Subject: [PATCH] vault backup: document the daily launchd schedule + macOS TCC gotcha Scheduled daily at 4am on the ultra. launchd can't exec scripts inside ~/Documents (TCC), so the job runs a copy under Application Support; header documents the sync/manage/remove commands. Co-Authored-By: Claude Fable 5 --- mrpgi-vault/backup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mrpgi-vault/backup.sh b/mrpgi-vault/backup.sh index cd4c995..d2a226f 100755 --- a/mrpgi-vault/backup.sh +++ b/mrpgi-vault/backup.sh @@ -12,6 +12,16 @@ # tar -xzf vault-YYYYMMDD-HHMMSS.tar.gz # gives ./data # scp -r data root@100.94.195.115:/opt/mrpgi-vault/ # ssh root@100.94.195.115 'docker restart mrpgi-vault' +# +# Scheduled daily on the ultra via a launchd LaunchAgent: +# ~/Library/LaunchAgents/games.monsterrobot.vault-backup.plist (fires 4am) +# NOTE: launchd can't execute scripts inside ~/Documents (macOS TCC blocks it), +# so the job runs a COPY at "~/Library/Application Support/mrpgi/backup.sh". +# After editing this file, resync that copy: +# cp mrpgi-vault/backup.sh ~/Library/"Application Support"/mrpgi/backup.sh +# Manage the job: +# launchctl kickstart -k gui/$(id -u)/games.monsterrobot.vault-backup # run now +# launchctl bootout gui/$(id -u)/games.monsterrobot.vault-backup # stop it set -e REMOTE="${MRPGI_VAULT_REMOTE:-root@100.94.195.115:/opt/mrpgi-vault/data}"