← back to Nas Setup
launchd/com.steve.nas-realestate-dump-mirror-root.plist
55 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
com.steve.nas-realestate-dump-mirror-ROOT — root-context replacement for the user LaunchAgent
of the same name. Installed to /Library/LaunchDaemons (root:wheel 644), bootstrapped into the
system/ domain by scripts/install-root-daemon.sh.
WHY root: the user LaunchAgent EPERM'd writing to /Volumes/Henry because macOS TCC won't honor
a Full Disk Access grant on the SIP /bin/bash responsible-process for a launchd job. A system
LaunchDaemon runs outside the per-user TCC consent domain, so it can write the external volume
without a GUI Full Disk Access toggle. Root gets its own copy of the Kamatera SSH key
(/var/root/.ssh/) + config from the install script — HOME=/var/root points ssh at it.
Added 2026-08-07 (TK-10323). The George-email leg of pull-dw-dump.sh self-skips under
HOME=/var/root (its `[ -f $HOME/.claude/... ]` guard); the CNCP alert card still fires.
-->
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.steve.nas-realestate-dump-mirror-root</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/nas-backup-sh</string>
<string>/Users/macstudio3/Projects/nas-setup/scripts/pull-dw-dump.sh</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>HOME</key>
<string>/var/root</string>
<key>HENRY_BACKUP_DIR</key>
<string>/Volumes/Henry/dw-backups/realestate</string>
<key>NAS_BACKUP_DIR</key>
<string>/Volumes/DW-Backups/realestate</string>
<key>PGDUMP_GLOB</key>
<string>/root/backups/db/realestate_*.dump</string>
<key>PGDUMP_FLOOR_MB</key>
<string>1</string>
<key>PGDUMP_TOC_FLOOR</key>
<string>5</string>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key><integer>3</integer>
<key>Minute</key><integer>50</integer>
</dict>
<key>RunAtLoad</key>
<false/>
<key>StandardOutPath</key>
<string>/Users/macstudio3/Projects/nas-setup/data/launchd-realestate-root.out.log</string>
<key>StandardErrorPath</key>
<string>/Users/macstudio3/Projects/nas-setup/data/launchd-realestate-root.err.log</string>
</dict>
</plist>