aether-hf / scripts /aether-backup.sh
iiioooo1's picture
feat: initial Aether HF Space deploy (SQLite + Dataset backup + auto-update cron)
a9e8b86 verified
Raw
History Blame Contribute Delete
379 Bytes
#!/bin/bash
# Wrapper for backup; called by cron and on shutdown.
set -euo pipefail
if [[ -z "${HF_TOKEN:-}" ]]; then
echo "$(date -u +%FT%TZ) aether-backup: HF_TOKEN unset, skip" >&2
exit 0
fi
if [[ -z "${AETHER_BACKUP_REPO:-}" ]]; then
echo "$(date -u +%FT%TZ) aether-backup: AETHER_BACKUP_REPO unset, skip" >&2
exit 0
fi
exec python3 /usr/local/bin/aether_backup.py