From 4ee2f6ffea6b9682f5b676669b0d3bc6711fa8f1 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Thu, 13 Feb 2025 00:31:30 +0900 Subject: [PATCH 1/6] Update docs/configuring-playbook-postgres-backup.md: replace the instruction with the reference to the document copied to the MASH project This follows the change for docs on BorgBackup with 414445b6bf09d29dc1075e8954fb78a66d26a53a. The document on the MASH project is available at https://github.com/mother-of-all-self-hosting/ansible-role-postgres-backup/blob/main/docs/configuring-postgres-backup.md. Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-postgres-backup.md | 41 ++------------------ 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/docs/configuring-playbook-postgres-backup.md b/docs/configuring-playbook-postgres-backup.md index 39f51835f..54e058f00 100644 --- a/docs/configuring-playbook-postgres-backup.md +++ b/docs/configuring-playbook-postgres-backup.md @@ -10,41 +10,8 @@ SPDX-License-Identifier: AGPL-3.0-or-later The playbook can install and configure [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local) for you via the [ansible-role-postgres-backup](https://github.com/mother-of-all-self-hosting/ansible-role-postgres-backup) Ansible role. -For a more complete backup solution (one that includes not only Postgres, but also other configuration/data files), you may wish to look into [BorgBackup](configuring-playbook-backup-borg.md) instead. +For details about configuring and installing it, you can check them via: +- [the role's document on the MASH (mother-of-all-self-hosting) project](https://github.com/mother-of-all-self-hosting/ansible-role-postgres-backup/blob/main/docs/configuring-postgres-backup.md) +- `roles/galaxy/postgres_backup/docs/configuring-postgres-backup.md` locally, if you have fetched the Ansible roles -## Adjusting the playbook configuration - -To enable Postgres backup, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file: - -```yaml -postgres_backup_enabled: true -``` - -Refer to the table below for additional configuration variables and their default values. - -| Name | Default value | Description | -| :-------------------------------- | :--------------------------- | :--------------------------------------------------------------- | -|`postgres_backup_enabled`|`false`|Set to true to use [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local) to create automatic database backups| -|`postgres_backup_schedule`| `'@daily'` |Cron-schedule specifying the interval between postgres backups.| -|`postgres_backup_keep_days`|`7`|Number of daily backups to keep| -|`postgres_backup_keep_weeks`|`4`|Number of weekly backups to keep| -|`postgres_backup_keep_months`|`12`|Number of monthly backups to keep| -|`postgres_backup_base_path` | `"{{ matrix_base_data_path }}/postgres-backup"` | Base path for postgres-backup. Also see `postgres_backup_data_path` | -|`postgres_backup_data_path` | `"{{ postgres_backup_base_path }}/data"` | Storage path for postgres-backup database backups | - -## Installing - -After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below: - - -```sh -ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start -``` - -The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all` - -`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. Note these shortcuts run the `ensure-matrix-users-created` tag too. - -## Troubleshooting - -As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-postgres-backup`. +**Note**: for a more complete backup solution (one that includes not only Postgres, but also other configuration/data files), you may wish to look into [BorgBackup](configuring-playbook-backup-borg.md) instead. From 3620870173540097230e5ae3ef47a4779c9134b0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 15:51:55 +0000 Subject: [PATCH 2/6] Update dependency myst-parser to v4.0.1 --- i18n/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/requirements.txt b/i18n/requirements.txt index cf48bd5a0..9a2b21645 100644 --- a/i18n/requirements.txt +++ b/i18n/requirements.txt @@ -12,7 +12,7 @@ markdown-it-py==3.0.0 MarkupSafe==3.0.2 mdit-py-plugins==0.4.2 mdurl==0.1.2 -myst-parser==4.0.0 +myst-parser==4.0.1 packaging==24.2 Pygments==2.19.1 PyYAML==6.0.2 From 9f17f748b1c1979f381f4b69b7630e73f39b6361 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 13 Feb 2025 06:30:07 +0200 Subject: [PATCH 3/6] Upgrade ntfy (v2.11.0-0 -> v2.11.0-1) Ref: https://github.com/mother-of-all-self-hosting/ansible-role-ntfy/pull/2 --- requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index 9ec613089..47990bf1f 100644 --- a/requirements.yml +++ b/requirements.yml @@ -28,7 +28,7 @@ version: v10008-0 name: jitsi - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-ntfy.git - version: v2.11.0-0 + version: v2.11.0-1 name: ntfy - src: git+https://github.com/devture/com.devture.ansible.role.playbook_help.git version: 201c939eed363de269a83ba29784fc3244846048 From c27fb2a832e69d3fb7bfd49751db1d00d95ff91b Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Wed, 12 Feb 2025 19:07:46 +0900 Subject: [PATCH 4/6] =?UTF-8?q?Fix=20capitalization:=20postgres=20?= =?UTF-8?q?=E2=86=92=20Postgres?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Suguru Hirahara --- CHANGELOG.md | 2 +- docs/configuring-playbook-matrix-media-repo.md | 2 +- docs/configuring-playbook-postgres-backup.md | 2 +- docs/configuring-playbook.md | 2 +- docs/maintenance-postgres.md | 2 +- docs/updating-users-passwords.md | 2 +- roles/custom/matrix-bot-maubot/templates/config.yaml.j2 | 2 +- roles/custom/matrix-bridge-mx-puppet-slack/defaults/main.yml | 2 +- roles/custom/matrix-synapse-auto-compressor/defaults/main.yml | 4 ++-- .../matrix-synapse/templates/synapse/homeserver.yaml.j2 | 2 +- .../matrix_playbook_migration/tasks/validate_config.yml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dcd99ba6..f850d47e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2144,7 +2144,7 @@ matrix_coturn_tls_v1_1_enabled: true Thanks to [foxcris](https://github.com/foxcris), the playbook can now make automated local Postgres backups on a fixed schedule using [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local). -Additional details are available in [Setting up postgres backup](docs/configuring-playbook-postgres-backup.md). +Additional details are available in [Setting up Postgres backup](docs/configuring-playbook-postgres-backup.md). # 2021-04-03 diff --git a/docs/configuring-playbook-matrix-media-repo.md b/docs/configuring-playbook-matrix-media-repo.md index 052cd90c3..33dd5ce1a 100644 --- a/docs/configuring-playbook-matrix-media-repo.md +++ b/docs/configuring-playbook-matrix-media-repo.md @@ -66,7 +66,7 @@ Take a look at: Here is a list of additional common configuration options: ```yaml -# The postgres database pooling options +# The Postgres database pooling options # The maximum number of connects to hold open. More of these allow for more concurrent # processes to happen. diff --git a/docs/configuring-playbook-postgres-backup.md b/docs/configuring-playbook-postgres-backup.md index 54e058f00..27aafd1ae 100644 --- a/docs/configuring-playbook-postgres-backup.md +++ b/docs/configuring-playbook-postgres-backup.md @@ -6,7 +6,7 @@ SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara SPDX-License-Identifier: AGPL-3.0-or-later --> -# Setting up postgres backup (optional) +# Setting up Postgres backup (optional) The playbook can install and configure [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local) for you via the [ansible-role-postgres-backup](https://github.com/mother-of-all-self-hosting/ansible-role-postgres-backup) Ansible role. diff --git a/docs/configuring-playbook.md b/docs/configuring-playbook.md index 30e8c808d..31d443616 100644 --- a/docs/configuring-playbook.md +++ b/docs/configuring-playbook.md @@ -206,7 +206,7 @@ Services that help you in administrating and monitoring your Matrix installation - Backups: - [Setting up BorgBackup](configuring-playbook-backup-borg.md) — a full Matrix server backup solution, including the Postgres database - - [Setting up postgres backup](configuring-playbook-postgres-backup.md) — a Postgres-database backup solution (note: does not include other files) + - [Setting up Postgres backup](configuring-playbook-postgres-backup.md) — a Postgres-database backup solution (note: does not include other files) ### Other specialized services diff --git a/docs/maintenance-postgres.md b/docs/maintenance-postgres.md index 2c69d038e..569d5fd4d 100644 --- a/docs/maintenance-postgres.md +++ b/docs/maintenance-postgres.md @@ -47,7 +47,7 @@ Example playbook invocations: ## Backing up PostgreSQL -To automatically make Postgres database backups on a fixed schedule, see [Setting up postgres backup](configuring-playbook-postgres-backup.md). +To automatically make Postgres database backups on a fixed schedule, see [Setting up Postgres backup](configuring-playbook-postgres-backup.md). To make a one off back up of the current PostgreSQL database, make sure it's running and then execute a command like this on the server: diff --git a/docs/updating-users-passwords.md b/docs/updating-users-passwords.md index aecd038ef..87a844bb8 100644 --- a/docs/updating-users-passwords.md +++ b/docs/updating-users-passwords.md @@ -22,7 +22,7 @@ You can manually generate the password hash by using the command-line after **SS docker exec -it matrix-synapse /usr/local/bin/hash_password -c /data/homeserver.yaml ``` -and then connecting to the postgres server and executing: +and then connecting to the Postgres server and executing: ```sql UPDATE users SET password_hash = '' WHERE name = '@alice:example.com'; diff --git a/roles/custom/matrix-bot-maubot/templates/config.yaml.j2 b/roles/custom/matrix-bot-maubot/templates/config.yaml.j2 index 8da34c9ed..73c75ce58 100644 --- a/roles/custom/matrix-bot-maubot/templates/config.yaml.j2 +++ b/roles/custom/matrix-bot-maubot/templates/config.yaml.j2 @@ -28,7 +28,7 @@ plugin_directories: # Configuration for storing plugin databases plugin_databases: # Some plugins still require sqlite, so configure a path here. - # postgres will be used if supported. + # Postgres will be used if supported. sqlite: /data/dbs postgres: default diff --git a/roles/custom/matrix-bridge-mx-puppet-slack/defaults/main.yml b/roles/custom/matrix-bridge-mx-puppet-slack/defaults/main.yml index 030ac871f..b46df5994 100644 --- a/roles/custom/matrix-bridge-mx-puppet-slack/defaults/main.yml +++ b/roles/custom/matrix-bridge-mx-puppet-slack/defaults/main.yml @@ -108,7 +108,7 @@ matrix_mx_puppet_slack_login_shared_secret: '' matrix_mx_puppet_slack_presence_enabled: true matrix_mx_puppet_slack_presence_interval: 5000 -# Database configuration, role uses 'sqlite' per default but playbook sets up postgres by default +# Database configuration, role uses 'sqlite' per default but playbook sets up Postgres by default matrix_mx_puppet_slack_database_engine: sqlite matrix_mx_puppet_slack_sqlite_database_path_local: "{{ matrix_mx_puppet_slack_data_path }}/database.db" diff --git a/roles/custom/matrix-synapse-auto-compressor/defaults/main.yml b/roles/custom/matrix-synapse-auto-compressor/defaults/main.yml index 212213d64..020a447c5 100644 --- a/roles/custom/matrix-synapse-auto-compressor/defaults/main.yml +++ b/roles/custom/matrix-synapse-auto-compressor/defaults/main.yml @@ -8,11 +8,11 @@ matrix_synapse_auto_compressor_enabled: true # renovate: datasource=docker depName=registry.gitlab.com/etke.cc/rust-synapse-compress-state matrix_synapse_auto_compressor_version: v0.1.4 -# note: UID/GID better to match the UID/GID of the postgres container, but it doesn't really matter, as volumes are not used here +# note: UID/GID better to match the UID/GID of the Postgres container, but it doesn't really matter, as volumes are not used here matrix_synapse_auto_compressor_uid: '' matrix_synapse_auto_compressor_gid: '' -# note: the postgres image version doesn't matter, as it is used for a SQL script that doesn't use any specific features +# note: the Postgres image version doesn't matter, as it is used for a SQL script that doesn't use any specific features matrix_synapse_auto_compressor_postgres_image: "postgres" matrix_synapse_auto_compressor_base_path: "{{ matrix_base_data_path }}/synapse-auto-compressor" diff --git a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 index 457726774..6c4624919 100644 --- a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -837,7 +837,7 @@ caches: # before reconnecting. Defaults to 0, which means no limit. # # 'allow_unsafe_locale' is an option specific to Postgres. Under the default behavior, Synapse will refuse to -# start if the postgres db is set to a non-C locale. You can override this behavior (which is *not* recommended) +# start if the Postgres db is set to a non-C locale. You can override this behavior (which is *not* recommended) # by setting 'allow_unsafe_locale' to true. Note that doing so may corrupt your database. You can find more information # here: https://matrix-org.github.io/synapse/latest/postgres.html#fixing-incorrect-collate-or-ctype and here: # https://wiki.postgresql.org/wiki/Locale_data_changes diff --git a/roles/custom/matrix_playbook_migration/tasks/validate_config.yml b/roles/custom/matrix_playbook_migration/tasks/validate_config.yml index 4d61f765f..272011c88 100644 --- a/roles/custom/matrix_playbook_migration/tasks/validate_config.yml +++ b/roles/custom/matrix_playbook_migration/tasks/validate_config.yml @@ -423,7 +423,7 @@ - name: (Deprecation) Catch and report devture_postgres variables ansible.builtin.fail: msg: |- - The postgres role in the playbook now lives under the MASH organization (https://github.com/mother-of-all-self-hosting/ansible-role-postgres). + The Postgres role in the playbook now lives under the MASH organization (https://github.com/mother-of-all-self-hosting/ansible-role-postgres). The new role is pretty much the same, but uses differently named variables. Please change your configuration (vars.yml) to rename all `devture_postgres_`-prefixed variables (`devture_postgres_*` -> `postgres_*`). From f4f666e5ecda1e2db6e7c4b6ba57d8ac93039a9c Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Thu, 13 Feb 2025 00:20:29 +0900 Subject: [PATCH 5/6] Update docs/container-images.md: add an entry for postgres-backup-local Signed-off-by: Suguru Hirahara --- docs/container-images.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/container-images.md b/docs/container-images.md index efed979c2..fbafe02e0 100644 --- a/docs/container-images.md +++ b/docs/container-images.md @@ -125,6 +125,7 @@ Services that help you in administrating and monitoring your Matrix installation | [Metrics and Graphs](configuring-playbook-prometheus-grafana.md) | [grafana/grafana](https://hub.docker.com/r/grafana/grafana/) | ❌ | Graphing tool that works well with the above two images. Our playbook also adds two dashboards for [Synapse](https://github.com/element-hq/synapse/tree/master/contrib/grafana) and [Node Exporter](https://github.com/rfrail3/grafana-dashboards) | | [Metrics and Graphs](configuring-playbook-prometheus-grafana.md#enable-metrics-and-graphs-for-nginx-logs-optional) | [martin-helmich/prometheus-nginxlog-exporter/exporter](https://ghcr.io/martin-helmich/prometheus-nginxlog-exporter/exporter) | ❌ | Addon for Prometheus that gathers access logs from various nginx reverse-proxies | | [Borg](configuring-playbook-backup-borg.md) | (N/A) | ❌ | Backups | +| [postgres-backup-local](configuring-playbook-postgres-backup.md) | [prodrigestivill/postgres-backup-local](https://hub.docker.com/r/prodrigestivill/postgres-backup-local) | ❌ | Create automatic database backups | | [rageshake](configuring-playbook-rageshake.md) | [matrix-org/rageshake](https://ghcr.io/matrix-org/rageshake) | ❌ | Bug report server | | [synapse-usage-exporter](configuring-playbook-synapse-usage-exporter.md) | Self-building | ❌ | Export the usage statistics of a Synapse homeserver to be scraped by Prometheus. | From 3c9067c4c2d640bf672cd6e5fb5c4d6c14e77716 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Thu, 13 Feb 2025 01:40:14 +0900 Subject: [PATCH 6/6] Update docs/configuring-playbook-etherpad.md: add the copyright header Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-etherpad.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/configuring-playbook-etherpad.md b/docs/configuring-playbook-etherpad.md index f6664f19d..0f151d3db 100644 --- a/docs/configuring-playbook-etherpad.md +++ b/docs/configuring-playbook-etherpad.md @@ -1,3 +1,15 @@ + + # Setting up Etherpad (optional) The playbook can install and configure [Etherpad](https://etherpad.org) for you.