root: fix Detection of S3 settings for backups

closes #1698

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-31 16:54:10 +01:00
parent 0a1ab74707
commit 5d9bed130a
1 changed files with 1 additions and 1 deletions

View File

@ -380,7 +380,7 @@ DBBACKUP_CONNECTOR_MAPPING = {
"django_prometheus.db.backends.postgresql": "dbbackup.db.postgresql.PgDumpConnector", "django_prometheus.db.backends.postgresql": "dbbackup.db.postgresql.PgDumpConnector",
} }
DBBACKUP_TMP_DIR = gettempdir() if DEBUG else "/tmp" # nosec DBBACKUP_TMP_DIR = gettempdir() if DEBUG else "/tmp" # nosec
if CONFIG.y("postgresql.s3_backup"): if CONFIG.y("postgresql.s3_backup.bucket", "") != "":
DBBACKUP_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" DBBACKUP_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
DBBACKUP_STORAGE_OPTIONS = { DBBACKUP_STORAGE_OPTIONS = {
"access_key": CONFIG.y("postgresql.s3_backup.access_key"), "access_key": CONFIG.y("postgresql.s3_backup.access_key"),