Stop excluding Synapse's local_thumbnails from BorgBackup

Synapse only generates thumbnails of local media at upload time (unless
dynamic_thumbnails is enabled, which the playbook does not do) and no
tooling exists to regenerate them, so restoring a backup left all
previously uploaded local images without thumbnails permanently. The
official Synapse backup guide recommends backing this directory up.

Related to #4004.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-07-13 21:18:43 +03:00
parent 94d8e28306
commit a03faef70f
2 changed files with 13 additions and 1 deletions
+10
View File
@@ -1,3 +1,13 @@
# 2026-07-14
## BorgBackup now includes Synapse's local thumbnails
For Synapse servers, the built-in [BorgBackup](./docs/configuring-playbook-backup-borg.md) integration no longer excludes the media store's `local_thumbnails` directory from backups.
Synapse only generates thumbnails of local media at upload time (unless `dynamic_thumbnails` is enabled, which the playbook does not do), and there is no tooling to regenerate them. Restoring a backup made with the previous exclusion list therefore left all previously uploaded local images without thumbnails. The [official Synapse backup guide](https://element-hq.github.io/synapse/latest/usage/administration/backups.html) recommends backing this directory up, and the playbook now follows that recommendation.
Expect your backups to grow somewhat, depending on how much image media your local users have uploaded. If you prefer the old behavior, you can redefine `backup_borg_location_exclude_patterns` in your `vars.yml`.
# 2026-07-12
## matrix-registration-bot has been removed from the playbook
+3 -1
View File
@@ -3378,9 +3378,11 @@ backup_borg_postgresql_databases_auto: "{{ postgres_managed_databases | map(attr
backup_borg_location_source_directories:
- "{{ matrix_base_data_path }}"
# local_thumbnails is deliberately NOT excluded: with dynamic_thumbnails disabled (Synapse's default),
# nothing regenerates lost thumbnails, so the official Synapse backup guide recommends backing them up.
backup_borg_location_exclude_patterns: |
{{
([matrix_synapse_media_store_path + '/remote_content', matrix_synapse_media_store_path + '/local_thumbnails', matrix_synapse_media_store_path + '/remote_thumbnail', matrix_synapse_media_store_path + '/url_cache', matrix_synapse_media_store_path + '/url_cache_thumbnails'] if matrix_homeserver_implementation == 'synapse' else [])
([matrix_synapse_media_store_path + '/remote_content', matrix_synapse_media_store_path + '/remote_thumbnail', matrix_synapse_media_store_path + '/url_cache', matrix_synapse_media_store_path + '/url_cache_thumbnails'] if matrix_homeserver_implementation == 'synapse' else [])
+
([postgres_data_path] if postgres_enabled else [])
}}