| @@ -28,6 +28,13 @@ matrix_backup_borg_schedule: "*-*-* 04:00:00" | |||||
| # what directory should be added to backup | # what directory should be added to backup | ||||
| matrix_backup_borg_source: "{{ matrix_base_data_path }}" | matrix_backup_borg_source: "{{ matrix_base_data_path }}" | ||||
| # exclude following paths: | |||||
| matrix_backup_borg_exclude: | |||||
| - "{{ 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" | |||||
| # borg encryption mode, only repokey-* is supported | # borg encryption mode, only repokey-* is supported | ||||
| matrix_backup_borg_encryption: repokey-blake2 | matrix_backup_borg_encryption: repokey-blake2 | ||||
| @@ -2,10 +2,14 @@ | |||||
| location: | location: | ||||
| source_directories: | source_directories: | ||||
| - /matrix | |||||
| - {{ matrix_backup_borg_source }} | |||||
| repositories: | repositories: | ||||
| - {{ matrix_backup_borg_repository }} | - {{ matrix_backup_borg_repository }} | ||||
| one_file_system: true | one_file_system: true | ||||
| exclude_patterns: | |||||
| {% for pattern in matrix_backup_borg_exclude %} | |||||
| - {{ pattern }} | |||||
| {% endfor %} | |||||
| storage: | storage: | ||||
| compression: {{ matrix_backup_borg_compression }} | compression: {{ matrix_backup_borg_compression }} | ||||
| @@ -23,7 +23,7 @@ ExecStartPre=-{{ matrix_host_command_docker }} run --rm --name matrix-backup-bor | |||||
| --network={{ matrix_docker_network }} \ | --network={{ matrix_docker_network }} \ | ||||
| --tmpfs=/tmp:rw,noexec,nosuid,size=100m \ | --tmpfs=/tmp:rw,noexec,nosuid,size=100m \ | ||||
| --mount type=bind,src={{ matrix_backup_borg_config_path }}/passwd,dst=/etc/passwd,ro \ | --mount type=bind,src={{ matrix_backup_borg_config_path }}/passwd,dst=/etc/passwd,ro \ | ||||
| --mount type=bind,src={{ matrix_backup_borg_source }},dst=/matrix,ro \ | |||||
| --mount type=bind,src={{ matrix_backup_borg_source }},dst={{ matrix_backup_borg_source }},ro \ | |||||
| --mount type=bind,src={{ matrix_backup_borg_config_path }},dst=/etc/borgmatic.d,ro \ | --mount type=bind,src={{ matrix_backup_borg_config_path }},dst=/etc/borgmatic.d,ro \ | ||||
| {% for arg in matrix_backup_borg_container_extra_arguments %} | {% for arg in matrix_backup_borg_container_extra_arguments %} | ||||
| {{ arg }} \ | {{ arg }} \ | ||||