From 9b5f9167cd1ca60fc4ce52ecf6555b6464068c27 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 1 Oct 2020 13:41:40 +0200 Subject: [PATCH] root: always enable dbbackup --- passbook/root/settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/passbook/root/settings.py b/passbook/root/settings.py index b5c5d1a79..d0d0e7bc6 100644 --- a/passbook/root/settings.py +++ b/passbook/root/settings.py @@ -89,6 +89,7 @@ INSTALLED_APPS = [ "guardian", "django_prometheus", "channels", + "dbbackup", "passbook.admin.apps.PassbookAdminConfig", "passbook.api.apps.PassbookAPIConfig", "passbook.audit.apps.PassbookAuditConfig", @@ -284,7 +285,6 @@ CELERY_RESULT_BACKEND = ( # Database backup if CONFIG.y("postgresql.backup"): - INSTALLED_APPS.append("dbbackup") DBBACKUP_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" DBBACKUP_CONNECTOR_MAPPING = { "django_prometheus.db.backends.postgresql": "dbbackup.db.postgresql.PgDumpConnector" @@ -294,7 +294,9 @@ if CONFIG.y("postgresql.backup"): AWS_STORAGE_BUCKET_NAME = CONFIG.y("postgresql.backup.bucket") AWS_S3_ENDPOINT_URL = CONFIG.y("postgresql.backup.host") AWS_DEFAULT_ACL = None - j_print("Database backup is configured.", host=CONFIG.y("postgresql.backup.host")) + j_print( + "Database backup to S3 is configured.", host=CONFIG.y("postgresql.backup.host") + ) # Add automatic task to backup CELERY_BEAT_SCHEDULE["db_backup"] = { "task": "passbook.lib.tasks.backup_database",