Files
hermes-recovery/scripts/hermes-live-sync.sh
T

35 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# hermes-live-sync.sh — Full Hermes sync to S3 every 15 min
# Mirrors entire .hermes directory (minus bulky caches) to Wasabi.
# Silent on success, loud on failure.
set -euo pipefail
HERMES_HOME="${HERMES_HOME:-$HOME/.hermes}"
ENDPOINT="https://s3.us-east-1.wasabisys.com"
BUCKET="hermes-vps-backups"
DEST_PREFIX="live"
if [ -f /opt/awscli-venv/bin/activate ]; then
source /opt/awscli-venv/bin/activate
fi
aws s3 sync "$HERMES_HOME" "s3://$BUCKET/$DEST_PREFIX/" \
--endpoint-url "$ENDPOINT" \
--exclude "audio_cache/*" \
--exclude "image_cache/*" \
--exclude "cache/*" \
--exclude "sandboxes/*" \
--exclude "kanban/*" \
--exclude "node/*" \
--exclude "bin/*" \
--exclude "logs/*" \
--exclude "*.lock" \
--exclude ".skills_prompt_snapshot.json" \
--exclude ".update_check" \
2>&1 | grep -v "^$" || true
# NOTE: Docker volume sync moved to hermes-docker-sync.sh (itpropartner-docker-volumes bucket)
# NOTE: Caddyfile sync moved to hermes-system-config-sync.sh (itpropartner-system-configs bucket)
exit 0