software-factory
MAmattpocock/skills336k近 7 天新增 5,004 个 star
Set up encrypted off-machine Hermes backups.
Nightly hermes backup, encrypted with age to a public key whose private half lives elsewhere, copied to a destination the user picks. It runs as a zero-token cron job that only messages the user when something fails.
Ask; don't guess. You need three things from the user:
age1…). Its private key must not be on this machine.b2:my-bucket/hermes) or an scp target (user@host:/backups/hermes).~/hermes-backups).Check the tools with the terminal tool:
age --version
rclone version || command -v scp
If age is missing, tell the user how to install it for their OS rather than installing it yourself.
Install the script. Copy scripts/offsite-backup.sh from this skill into ~/.hermes/scripts/offsite-backup.sh. Fill in the three values at the top, then run chmod 700 on it.
Test it once by hand and show the user the result:
bash ~/.hermes/scripts/offsite-backup.sh && echo "backup ok"
The script prints nothing on success and one line on failure.
Schedule it with no model involved. Output is delivered only when the script prints something, which happens only on failure:
hermes cron create "0 3 * * *" --no-agent --script offsite-backup.sh \
--name offsite-backup --deliver telegram
Use whatever delivery target the user prefers, or local.
Explain the restore path and have the user try it once, on the machine that holds the private key:
age -d -i ~/.config/age/key.txt -o hermes-backup.zip hermes-backup-YYYYMMDD-HHMMSS.zip.age
hermes import hermes-backup.zip
hermes cron list shows offsite-backup as active, and hermes cron runs offsite-backup shows a clean run the next morning.hermes backup includes API keys and bot tokens. Never copy the unencrypted zip off the machine. The script deletes the plaintext zip after encrypting it.hermes backup is safe to run while Hermes is running. Never copy state.db by hand instead.-k in the script prunes old local zips. Pruning remote copies is the destination's job (for example a bucket lifecycle rule).MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
AFaffaan-m/ECC314k近 7 天新增 4,125 个 star
AFaffaan-m/ECC314k近 7 天新增 4,125 个 star
AFaffaan-m/ECC314k近 7 天新增 4,125 个 star
DIDietrichGebert/ponytail202k近 7 天新增 4,780 个 star