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 <noreply@anthropic.com>
This commit is contained in:
type-two 2026-07-05 12:32:10 +10:00
parent 24f812dbfd
commit eb4a21491e

View File

@ -12,6 +12,16 @@
# tar -xzf vault-YYYYMMDD-HHMMSS.tar.gz # gives ./data # tar -xzf vault-YYYYMMDD-HHMMSS.tar.gz # gives ./data
# scp -r data root@100.94.195.115:/opt/mrpgi-vault/ # scp -r data root@100.94.195.115:/opt/mrpgi-vault/
# ssh root@100.94.195.115 'docker restart 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 set -e
REMOTE="${MRPGI_VAULT_REMOTE:-root@100.94.195.115:/opt/mrpgi-vault/data}" REMOTE="${MRPGI_VAULT_REMOTE:-root@100.94.195.115:/opt/mrpgi-vault/data}"