[tasks] Fix backup locations
All checks were successful
build & deploy / test (push) Successful in 1m57s
build & deploy / build-and-deploy (push) Successful in 30s

This commit is contained in:
2026-05-24 12:47:12 -04:00
parent 6927729284
commit 0639033aa9
3 changed files with 15 additions and 7 deletions

View File

@ -327,6 +327,7 @@ def _run_remote_cleanup(ssh_key, ssh_host, remote_path):
return
from datetime import datetime
now = datetime.now()
to_delete = _retention_files_to_delete(files, now)
if not to_delete:
@ -363,7 +364,7 @@ def backup_database():
logger.warning("backup_database skipped — not PostgreSQL")
return
backup_dir = Path("/var/backup/vrobbler")
backup_dir = Path(settings.DB_BACKUP_LOCAL_DIR)
backup_dir.mkdir(parents=True, exist_ok=True)
date_str = datetime.now().strftime("%Y_%m_%d")
backup_path = backup_dir / f"vrobbler-backup-{date_str}.sql.gz"