spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.72k stars 1.02k forks source link

You cannot use borg backup with such an old version () of Postgres #2856

Closed kuba-orlik closed 7 months ago

kuba-orlik commented 12 months ago

Describe the bug

When running ansible-playbook -i inventory/hosts setup.yml --ask-vault-password --tags=install-all, I eventually get this following error:

...
TASK [galaxy/backup_borg : Fail if detected Postgres version is unsupported] *****************************************************************************************************************
fatal: [matrix.my.host]: FAILED! => changed=false 
  msg: 'You cannot use borg backup with such an old version () of Postgres. Consider upgrading - link to docs for upgrading Postgres: docs/maintenance-postgres.md#upgrading-postgresql'

PLAY RECAP ***********************************************************************************************************************************************************************************
matrix.matriks.chat        : ok=430  changed=24   unreachable=0    failed=1    skipped=540  rescued=0    ignored=0   

To Reproduce My vars.yml file looks like this:

matrix_domain: my.host
matrix_homeserver_implementation: synapse
matrix_homeserver_generic_secret_key: !vault |
  $ANSIBLE_VAULT;1.1;AES256
  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
matrix_ssl_lets_encrypt_support_email: "some_email@example.com"
devture_postgres_connection_password: "matrix"
matrix_nginx_proxy_base_domain_serving_enabled: true # so the main domain is proxied and uses .well-known kept within the docker. If you disable that, then you ned to reconfigure the well-known settings: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-base-domain-serving.md

matrix_synapse_admin_enabled: true
matrix_dimension_enabled: true
matrix_dimension_admins:
  - "@kuba:{{ matrix_domain }}"
matrix_dimension_access_token: !vault |
  $ANSIBLE_VAULT;1.1;AES256
  xxxxxx
prometheus_enabled: true
prometheus_node_exporter_enabled: true
prometheus_postgres_exporter_enabled: true
grafana_enabled: true
grafana_anonymous_access: false
grafana_default_admin_user: "admin"
# Changing the password subsequently won't work.
grafana_default_admin_password: !vault |
  $ANSIBLE_VAULT;1.1;AES256
  xxxxxxx
matrix_synapse_workers_enabled: true
matrix_client_element_themes_enabled: true
matrix_client_hydrogen_enabled: true
matrix_server_fqn_hydrogen: "lite.{{ matrix_domain }}"
matrix_client_cinny_enabled: true
matrix_server_fqn_cinny: "lite2.{{ matrix_domain }}"
matrix_ma1sd_enabled: true
devture_postgres_process_extra_arguments: ["-c 'max_connections=200'"]
matrix_mautrix_telegram_enabled: true
matrix_mautrix_telegram_api_id: 1340141
matrix_mautrix_telegram_api_hash: !vault |
  $ANSIBLE_VAULT;1.1;AES256
  xxxxx
matrix_synapse_ext_password_provider_shared_secret_auth_enabled: true
matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: !vault |
  $ANSIBLE_VAULT;1.1;AES256
  xxxxxxx
matrix_mautrix_telegram_bot_token: !vault |
  $ANSIBLE_VAULT;1.1;AES256
  xxxx
matrix_mautrix_telegram_configuration_extension_yaml: |
  bridge:
    permissions:
      '*': relaybot
      '@kuba:my.host': admin
    # The formats to use when sending state events to Telegram via the relay bot.
    #
    # Variables from `message_formats` that have the `sender_` prefix are available without the prefix.
    # In name_change events, `$prev_displayname` is the previous displayname.
    #
    # Set format to an empty string to disable the messages for that event.
    state_event_formats:
        join: "$distinguisher <b>$displayname</b> joined the room."
        leave: "$distinguisher <b>$displayname</b> left the room."
        name_change: ""
    relay_user_distinguishers: [🟦, 🟣, 🟩, ⭕, 🔶, ⬛, 🔵, 🟢]
    message_formats:
        m.text: "$distinguisher <b>$sender_displayname</b>: $message"
        m.notice: "$distinguisher <b>$sender_displayname</b>: $message"
        m.emote: "* <b>$sender_displayname</b> $message"
        m.file: "$distinguisher <b>$sender_displayname</b> sent a file: $message"
        m.image: "$distinguisher <b>$sender_displayname</b> sent an image: $message"
        m.audio: "$distinguisher <b>$sender_displayname</b> sent an audio file: $message"
        m.video: "$distinguisher <b>$sender_displayname</b> sent a video: $message"
        m.location: "$distinguisher <b>$sender_displayname</b> sent a location: $message"
devture_systemd_service_manager_up_verification_delay_seconds: 30
matrix_playbook_reverse_proxy_type: "playbook-managed-traefik"
devture_traefik_config_certificatesResolvers_acme_email: "my@email"
matrix_mautrix_signal_enabled: true
matrix_mautrix_signal_relaybot_enabled: true
matrix_mautrix_signal_configuration_extension_yaml: |
  bridge:
    permissions:
      '@someone': admin
matrix_mautrix_whatsapp_enabled: true
matrix_mautrix_whatsapp_bridge_relay_enabled: true
matrix_appservice_discord_enabled: true
matrix_appservice_discord_client_id: "xxx"
matrix_appservice_discord_bot_token: "xxxxx"
matrix_appservice_discord_bridge_enableSelfServiceBridging: true
backup_borg_enabled: true
backup_borg_location_repositories:
  - ssh://host:/backup_location
backup_borg_storage_encryption_passphrase: !vault |
  $ANSIBLE_VAULT;1.1;AES256
  xxxxx
backup_borg_ssh_key_private: !vault |
  $ANSIBLE_VAULT;1.1;AES256
  xxxxxxxxxx
backup_borg_container_extra_arguments: ["--volume", "/etc/hosts:/etc/hosts"]

I run ansible-playbook -i inventory/hosts setup.yml --ask-vault-password --tags=install-all and see the error mentioned above.

Matrix Server:

aine-etke commented 11 months ago

it doesn't detect your postgres version. Try to update playbook (git pull; just roles) and run it again

kuba-orlik commented 11 months ago

When I do this, Matrix seems to lose all data and doesn't let me log in

aine-etke commented 11 months ago

That's odd. Did you change anything within playbook sources?

kuba-orlik commented 7 months ago

For some reason, storage directory changed from /var/matrix to /matrix. I symlinked them and now it works properly