2022-04-05 11:37:27 +00:00
|
|
|
---
|
2022-07-16 20:59:21 +00:00
|
|
|
# Project source code URL: https://gitlab.com/etke.cc/borgmatic
|
|
|
|
|
2022-04-05 11:37:27 +00:00
|
|
|
matrix_backup_borg_enabled: true
|
|
|
|
|
2022-04-14 15:06:54 +00:00
|
|
|
matrix_backup_borg_base_path: "{{ matrix_base_data_path }}/backup-borg"
|
|
|
|
matrix_backup_borg_config_path: "{{ matrix_backup_borg_base_path }}/config"
|
|
|
|
|
2022-04-05 11:37:27 +00:00
|
|
|
matrix_backup_borg_container_image_self_build: false
|
2022-04-15 16:38:10 +00:00
|
|
|
matrix_backup_borg_docker_repo: "https://gitlab.com/etke.cc/borgmatic"
|
2022-07-18 11:43:52 +00:00
|
|
|
matrix_backup_borg_docker_repo_version: main
|
2022-04-14 15:06:54 +00:00
|
|
|
matrix_backup_borg_docker_src_files_path: "{{ matrix_backup_borg_base_path }}/docker-src"
|
2022-04-05 11:37:27 +00:00
|
|
|
|
2022-04-15 16:38:10 +00:00
|
|
|
# version determined automatically, based on postgres server version (if enabled), otherwise latest is used
|
2022-04-14 15:06:54 +00:00
|
|
|
matrix_backup_borg_version: ""
|
2022-04-05 11:37:27 +00:00
|
|
|
matrix_backup_borg_docker_image: "{{ matrix_backup_borg_docker_image_name_prefix }}etke.cc/borgmatic:{{ matrix_backup_borg_version }}"
|
|
|
|
matrix_backup_borg_docker_image_name_prefix: "{{ 'localhost/' if matrix_backup_borg_container_image_self_build else 'registry.gitlab.com/' }}"
|
2022-07-18 08:22:05 +00:00
|
|
|
matrix_backup_borg_docker_image_force_pull: "{{ matrix_backup_borg_docker_image.endswith(':latest') or matrix_backup_borg_version | default('') == '' }}"
|
2022-04-05 11:37:27 +00:00
|
|
|
|
|
|
|
# A list of extra arguments to pass to the container
|
|
|
|
matrix_backup_borg_container_extra_arguments: []
|
|
|
|
|
|
|
|
# List of systemd services that matrix-backup-borg.service depends on
|
|
|
|
matrix_backup_borg_systemd_required_services_list: ['docker.service']
|
|
|
|
|
|
|
|
# List of systemd services that matrix-backup-borg.service wants
|
|
|
|
matrix_backup_borg_systemd_wanted_services_list: []
|
|
|
|
|
|
|
|
# systemd calendar configuration for backup job
|
|
|
|
matrix_backup_borg_schedule: "*-*-* 04:00:00"
|
|
|
|
|
|
|
|
# what directories should be added to backup
|
|
|
|
matrix_backup_borg_location_source_directories: []
|
|
|
|
|
2022-04-14 15:06:54 +00:00
|
|
|
# postgres db backup
|
|
|
|
matrix_backup_borg_postgresql_enabled: true
|
2022-04-15 16:38:10 +00:00
|
|
|
matrix_backup_borg_supported_postgres_versions: ['12', '13', '14']
|
2022-04-14 15:06:54 +00:00
|
|
|
matrix_backup_borg_postgresql_databases: []
|
|
|
|
matrix_backup_borg_postgresql_databases_hostname: "matrix-postgres"
|
|
|
|
matrix_backup_borg_postgresql_databases_username: "matrix"
|
|
|
|
matrix_backup_borg_postgresql_databases_password: ""
|
|
|
|
matrix_backup_borg_postgresql_databases_port: 5432
|
|
|
|
|
2022-04-05 11:37:27 +00:00
|
|
|
# target repositories
|
|
|
|
matrix_backup_borg_location_repositories: []
|
|
|
|
|
|
|
|
# exclude following paths:
|
|
|
|
matrix_backup_borg_location_exclude_patterns: []
|
|
|
|
|
2022-04-18 11:48:37 +00:00
|
|
|
# borg encryption mode, only "repokey-*" and "none" are supported
|
2022-04-05 11:37:27 +00:00
|
|
|
matrix_backup_borg_encryption: repokey-blake2
|
|
|
|
|
|
|
|
# private ssh key used to connect to the borg repo
|
|
|
|
matrix_backup_borg_ssh_key_private: ""
|
|
|
|
|
2022-04-18 11:48:37 +00:00
|
|
|
# allow unencrypted repo access
|
|
|
|
matrix_backup_borg_unknown_unencrypted_repo_access_is_ok: "{{ matrix_backup_borg_encryption == 'none' }}"
|
|
|
|
|
2022-04-05 11:37:27 +00:00
|
|
|
# borg ssh command with ssh key
|
|
|
|
matrix_backup_borg_storage_ssh_command: ssh -o "StrictHostKeyChecking accept-new" -i /etc/borgmatic.d/sshkey
|
|
|
|
|
|
|
|
# compression algorithm
|
|
|
|
matrix_backup_borg_storage_compression: lz4
|
|
|
|
|
|
|
|
# archive name format
|
2022-04-15 16:38:10 +00:00
|
|
|
matrix_backup_borg_storage_archive_name_format: matrix-{now:%Y-%m-%d-%H%M%S}
|
2022-04-05 11:37:27 +00:00
|
|
|
|
|
|
|
# repository passphrase
|
|
|
|
matrix_backup_borg_storage_encryption_passphrase: ""
|
|
|
|
|
|
|
|
# retention configuration
|
|
|
|
matrix_backup_borg_retention_keep_hourly: 0
|
|
|
|
matrix_backup_borg_retention_keep_daily: 7
|
|
|
|
matrix_backup_borg_retention_keep_weekly: 4
|
|
|
|
matrix_backup_borg_retention_keep_monthly: 12
|
|
|
|
matrix_backup_borg_retention_keep_yearly: 2
|
|
|
|
|
|
|
|
# retention prefix
|
2022-04-15 16:38:10 +00:00
|
|
|
matrix_backup_borg_retention_prefix: matrix-
|
2022-04-14 15:06:54 +00:00
|
|
|
|
|
|
|
# Default borgmatic configuration template which covers the generic use case.
|
|
|
|
# You can customize it by controlling the various variables inside it.
|
|
|
|
#
|
|
|
|
# For a more advanced customization, you can extend the default (see `matrix_backup_borg_configuration_extension_yaml`)
|
|
|
|
# or completely replace this variable with your own template.
|
|
|
|
matrix_backup_borg_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
|
|
|
|
|
|
|
|
matrix_backup_borg_configuration_extension_yaml: |
|
|
|
|
# Your custom YAML configuration for borgmatic goes here.
|
|
|
|
# This configuration extends the default starting configuration (`matrix_borg_configuration_yaml`).
|
|
|
|
#
|
|
|
|
# You can override individual variables from the default configuration, or introduce new ones.
|
|
|
|
#
|
|
|
|
# If you need something more special, you can take full control by
|
|
|
|
# completely redefining `matrix_backup_borg_configuration_yaml`.
|
|
|
|
|
2022-07-18 08:22:05 +00:00
|
|
|
matrix_backup_borg_configuration_extension: "{{ matrix_backup_borg_configuration_extension_yaml | from_yaml if matrix_backup_borg_configuration_extension_yaml | from_yaml is mapping else {} }}"
|
2022-04-14 15:06:54 +00:00
|
|
|
|
|
|
|
# Holds the final borgmatic configuration (a combination of the default and its extension).
|
|
|
|
# You most likely don't need to touch this variable. Instead, see `matrix_backup_borg_configuration_yaml`.
|
2022-07-18 09:28:39 +00:00
|
|
|
matrix_backup_borg_configuration: "{{ matrix_backup_borg_configuration_yaml | from_yaml | combine(matrix_backup_borg_configuration_extension, recursive=True) }}"
|