auto-save 2026-05-26 06:53 (~2)

This commit is contained in:
2026-05-26 06:53:30 +08:00
parent 4104bbe5d5
commit c9d8fa7139
2 changed files with 242 additions and 262 deletions

View File

@@ -30,7 +30,7 @@ ssh "$HOST" "set -euo pipefail
exit 1
}
if docker ps --format '{{.Names}}' | grep -qx skg-marketing-postgres; then
docker exec skg-marketing-postgres sh -lc 'pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' \
docker exec skg-marketing-postgres sh -lc 'pg_dump -U "\$POSTGRES_USER" "\$POSTGRES_DB"' \
| gzip > '$BACKUP_DIR/skg-marketing-postgres-'\$stamp'.sql.gz'
fi
find '$BACKUP_DIR' -name 'skg-marketing-preserve-*.tgz' -type f -printf '%T@ %p\n' | sort -nr | tail -n +8 | cut -d' ' -f2- | xargs -r rm -f