Spaces:
Runtime error
Runtime error
Download scripts/backup-postgres.sh from ClaraSu/llm-router: direct link, hf CLI and curl.
- Browser
- Download file 331 Bytes
-
https://huggingface.co/spaces/ClaraSu/llm-router/resolve/main/scripts/backup-postgres.sh
- Command line
-
hf download hf://spaces/ClaraSu/llm-router/scripts/backup-postgres.sh
-
curl -L -o backup-postgres.sh https://huggingface.co/spaces/ClaraSu/llm-router/resolve/main/scripts/backup-postgres.sh
331 Bytes
| set -euo pipefail | |
| BACKUP_DIR="${HOME}/servers/backups/llm-router-postgres" | |
| STAMP=$(date +%Y%m%d-%H%M%S) | |
| docker exec llm-router-postgres pg_dump -U llmrouter llmrouter | gzip > "${BACKUP_DIR}/${STAMP}.sql.gz" | |
| # Keep the last 14 days, delete anything older. | |
| find "$BACKUP_DIR" -name '*.sql.gz' -mtime +14 -delete | |