From 71de7cd8cd814c9a6632bd03dcc3d0ca250efc4e Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 26 Nov 2022 18:51:27 +0200 Subject: [PATCH] Simplify matrix_backup_borg_postgresql_databases definition There was no need to add `synapse` to the list manually and then add all other additional databases. When the `synapse` database was the main database, this made sense. Since a long time ago already, ALL databases are "additional" databases, so the `synapse` database is part of that list. We could additional add the main (`matrix`) database to this list, but there's probably no point in backing that one up. --- group_vars/matrix_servers | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index cf9c71933..2bcb22da5 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -1655,14 +1655,7 @@ matrix_backup_borg_postgresql_databases_hostname: "{{ matrix_postgres_connection matrix_backup_borg_postgresql_databases_username: "{{ matrix_postgres_connection_username }}" matrix_backup_borg_postgresql_databases_password: "{{ matrix_postgres_connection_password }}" matrix_backup_borg_postgresql_databases_port: "{{ matrix_postgres_connection_port }}" -matrix_backup_borg_postgresql_databases: | - {{ - (([{ - 'name': matrix_synapse_database_database - }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else []) - + - matrix_postgres_additional_databases)|map(attribute='name') | list - }} +matrix_backup_borg_postgresql_databases: "{{ matrix_postgres_additional_databases | map(attribute='name') if matrix_postgres_enabled else [] }}" matrix_backup_borg_location_source_directories: - "{{ matrix_base_data_path }}" matrix_backup_borg_location_exclude_patterns: |