[tasks] Fix backup locations
This commit is contained in:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user