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
+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 [])
}}