- adapted documentation

- removed build_database_list.yml
development
foxcris 4 years ago
parent 11cd1cb0fa
commit 76fbc59b61

@ -12,26 +12,6 @@ The playbook can install and configure [docker-postgres-backup-local](https://gi
|matrix_postgres_backup_keep_weeks|"4"|Number of weekly backups to keep| |matrix_postgres_backup_keep_weeks|"4"|Number of weekly backups to keep|
|matrix_postgres_backup_keep_months|"12"|Number of monthly backups to keep| |matrix_postgres_backup_keep_months|"12"|Number of monthly backups to keep|
|matrix_postgres_backup_path | "{{ matrix_base_data_path }}/postgres-backup" | Storagepath for the database backups| |matrix_postgres_backup_path | "{{ matrix_base_data_path }}/postgres-backup" | Storagepath for the database backups|
|matrix_postgres_backup_matrix_reminder_bot_enabled| false | Set to true to backup matrix_reminder_bot database. Per default matrix-reminder-bot uses an sqlite database. Only use this if you are using a postgres database for matrix-reminder-bot. |
|matrix_postgres_backup_matrix_appservice_discord_enabled| false | Set to true to backup matrix_appservice_discord database. Per default matrix_appservice_discord uses an sqlite database. Only use this if you are using a postgres database for matrix_appservice_discord. |
|matrix_postgres_backup_matrix_appservice_irc_enabled| false | Set to true to backup matrix_appservice_irc database. Per default matrix_appservice_irc uses an nedb database. Only use this if you are using a postgres database for matrix_appservice_irc. |
|matrix_postgres_backup_matrix_appservice_slack_enabled| false | Set to true to backup matrix_appservice_slack database. Per default matrix_appservice_slack uses an nedb database. Only use this if you are using a postgres database for matrix_appservice_slack. |
|matrix_postgres_backup_matrix_mautrix_facebook_enabled| false | Set to true to backup matrix_mautrix_facebook database. Per default matrix_mautrix_facebook uses an postgresned database. |
|matrix_postgres_backup_matrix_mautrix_hangouts_enabled| false | Set to true to backup _matrix_mautrix_hangouts database. Per default _matrix_mautrix_hangouts uses an sqlite database. Only use this if you are using a postgres database for _matrix_mautrix_hangouts. |
|matrix_postgres_backup_matrix_mautrix_signal_enabled| false | Set to true to backup matrix_mautrix_signal database. Per default matrix_mautrix_signal uses an postgres database. |
|matrix_postgres_backup_matrix_mautrix_telegram_enabled| false | Set to true to backup matrix_mautrix_telegram database. Per default matrix_mautrix_telegram uses an sqlite database. Only use this if you are using a postgres database for matrix_mautrix_telegram. |
|matrix_postgres_backup_matrix_mautrix_whatsapp_enabled| false | Set to true to backup matrix_mautrix_whatsapp database. Per default matrix_mautrix_whatsapp uses an sqlite database. Only use this if you are using a postgres database for matrix_mautrix_whatsapp. |
|matrix_postgres_backup_matrix_mx_puppet_discord_enabled| false | Set to true to backup matrix_mx_puppet_discord database. Per default matrix_mx_puppet_discord uses an sqlite database. Only use this if you are using a postgres database for matrix_mx_puppet_discord. |
|matrix_postgres_backup_matrix_mx_puppet_instagram_enabled| false | Set to true to backup matrix_mx_puppet_instagram database. Per default matrix_mx_puppet_instagram uses an sqlite database. Only use this if you are using a postgres database for matrix_mx_puppet_instagram. |
|matrix_postgres_backup_matrix_mx_puppet_skype_enabled| false | Set to true to backup matrix_mx_puppet_skype database. Per default matrix_mx_puppet_skype uses an sqlite database. Only use this if you are using a postgres database for matrix_mx_puppet_skype. |
|matrix_postgres_backup_matrix_mx_puppet_slack_enabled| false | Set to true to backup matrix_mx_puppet_slack database. Per default matrix_mx_puppet_slack uses an sqlite database. Only use this if you
|matrix_postgres_backup_matrix_mx_puppet_steam_enabled| false | Set to true to backup matrix_mx_puppet_steam database. Per default matrix_mx_puppet_steam uses an sqlite database. Only use this if you are using a postgres database for matrix_mx_puppet_steam. |
|matrix_postgres_backup_matrix_mx_puppet_twitter_enabled| false | Set to true to backup matrix_mx_puppet_twitter database. Per default matrix_mx_puppet_twitter uses an sqlite database. Only use this if you are using a postgres database for matrix_mx_puppet_twitter. |
|matrix_postgres_backup_matrix_dimension_enabled| false | Set to true to backup matrix_dimension database. Per default matrix_dimension uses an sqlite database. Only use this if you are using a postgres database for matrix_dimension. |
|matrix_postgres_backup_matrix_etherpad_enabled| false | Set to true to backup matrix_etherpad database. Per default matrix_etherpad uses an sqlite database. Only use this if you are using a postgres database for matrix_etherpad. |
|matrix_postgres_backup_matrix_ma1sd_enabled| false | Set to true to backup matrix_ma1sd database. Per default matrix_ma1sd uses an sqlite database. Only use this if you are using a postgres database for matrix_ma1sd. |
|matrix_postgres_backup_matrix_registration_enabled| false | Set to true to backup matrix_registration database. Per default matrix_registration uses an sqlite database. Only use this if you are using a postgres database for matrix_registration. |
|matrix_postgres_backup_matrix_synapse_enabled| true | Set to false to disabble backup of matrix_synapse database. |
## Installing ## Installing

@ -1,176 +0,0 @@
---
# Detect wich databases have to backuped
# Default value is the "matrix_postgres_db_name"
# has to be extended for each service using a seperate db in postgres
# - name: Check if matrix_reminder_bot uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_bot_matrix_reminder_bot_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_bot_matrix_reminder_bot_database_engine == 'postgres'
# - name: Check if matrix_appservice_discord uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_appservice_discord_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_appservice_discord_database_engine == 'postgres'
# - name: Check if matrix_appservice_irc uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_appservice_irc_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_appservice_irc_database_engine == 'postgres'
# - name: Check if matrix_appservice_slack_database uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_appservice_slack_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_appservice_slack_database_engine == 'postgres'
# - name: Check if matrix_mautrix_facebook uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mautrix_facebook_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mautrix_facebook_database_engine == 'postgres'
# - name: Check if matrix_mautrix_hangouts uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mautrix_hangouts_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mautrix_hangouts_database_engine == 'postgres'
# - name: Check if matrix_mautrix_signal uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mautrix_signal_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mautrix_signal_database_engine == 'postgres'
# - name: Check if matrix_mautrix_telegram uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mautrix_telegram_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mautrix_telegram_database_engine == 'postgres'
# - name: Check if matrix_mautrix_whatsapp uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mautrix_whatsapp_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mautrix_whatsapp_database_engine == 'postgres'
# - name: Check if matrix_mx_puppet_discord uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mx_puppet_discord_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mx_puppet_discord_database_engine == 'postgres'
# - name: Check if matrix_mx_puppet_instagram uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mx_puppet_instagram_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mx_puppet_instagram_database_engine == 'postgres'
# - name: Check if matrix_mx_puppet_skype uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mx_puppet_skype_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mx_puppet_skype_database_engine == 'postgres'
# - name: Check if matrix_mx_puppet_slack uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mx_puppet_slack_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mx_puppet_slack_database_engine == 'postgres'
# - name: Check if matrix_mx_puppet_steam uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mx_puppet_steam_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mx_puppet_steam_database_engine == 'postgres'
# - name: Check if matrix_mx_puppet_twitter uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_mx_puppet_twitter_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_mx_puppet_twitter_database_engine == 'postgres'
# - name: Check if matrix_dimension uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_dimension_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_dimension_database_engine == 'postgres'
# - name: Check if matrix_etherpad uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_etherpad_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_etherpad_database_engine == 'postgres'
# - name: Check if matrix_ma1sd uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_ma1sd_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_ma1sd_database_engine == 'postgres'
# - name: Check if matrix_registration uses postgres database
# set_fact:
# matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list }},{{ matrix_registration_database_name }}"
# when:
# - matrix_postgres_backup_enabled|bool
# - matrix_registration_database_engine == 'postgres'
#- name: Build list of all databases to backup - part 1
# set_fact:
# matrix_postgres_backup_db_list: '{% if item.enabled %}{% if matrix_postgres_backup_db_list=="" %}{{item.dbname}}{% else %}{{ matrix_postgres_backup_db_list }},{{item.dbname}}{% endif %}{% else %}{% endif %}'
# loop:
# - { enabled: '{{matrix_postgres_backup_matrix_reminder_bot_enabled|bool}}' , dbname: '{{ matrix_bot_matrix_reminder_bot_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_appservice_discord_enabled|bool}}' , dbname: '{{ matrix_appservice_discord_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_appservice_irc_enabled|bool}}' , dbname: '{{ matrix_appservice_irc_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_appservice_slack_enabled|bool}}' , dbname: '{{ matrix_appservice_slack_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mautrix_facebook_enabled|bool}}' , dbname: '{{ matrix_mautrix_facebook_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mautrix_hangouts_enabled|bool}}' , dbname: '{{ matrix_mautrix_hangouts_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mautrix_signal_enabled|bool}}' , dbname: '{{ matrix_mautrix_signal_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mautrix_telegram_enabled|bool}}' , dbname: '{{ matrix_mautrix_telegram_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mautrix_whatsapp_enabled|bool}}' , dbname: '{{ matrix_mautrix_whatsapp_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mx_puppet_instagram_enabled|bool}}' , dbname: '{{ matrix_postgres_backup_matrix_mx_puppet_instagram_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mx_puppet_skype_enabled|bool}}' , dbname: '{{ matrix_mx_puppet_skype_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mx_puppet_slack_enabled|bool}}' , dbname: '{{ matrix_mx_puppet_slack_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mx_puppet_steam_enabled|bool}}' , dbname: '{{ matrix_mx_puppet_steam_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_mx_puppet_twitter_enabled|bool}}' , dbname: '{{ matrix_mx_puppet_twitter_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_dimension_enabled|bool}}' , dbname: '{{ matrix_dimension_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_etherpad_enabled|bool}}' , dbname: '{{ matrix_etherpad_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_ma1sd_enabled|bool}}' , dbname: '{{ matrix_ma1sd_database_name }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_registration_enabled|bool}}' , dbname: '{{ matrix_registration_database_engine }}' }
# - { enabled: '{{matrix_postgres_backup_matrix_synapse_enabled|bool}}' , dbname: '{{ matrix_postgres_db_name }}' }
- name: Build list of all databases to backup - part 2
set_fact:
matrix_postgres_backup_db_list_prepare: "{% set res = [ ] %}{% for db in matrix_postgres_backup_db_dict %}{% if db.enabled %}{% set ignored = res.append(db.dbname) %}{% endif %}{% endfor %}{{ res }}"
- name: Build list of all databases to backup - part 1
set_fact:
matrix_postgres_backup_db_list: "{{ matrix_postgres_backup_db_list_prepare | join(',') }}"
- name: Going to backup the following list of databases
debug:
msg: "{{ matrix_postgres_backup_db_list }}"
when: matrix_postgres_backup_enabled|bool
Loading…
Cancel
Save