Skip to content
Snippets Groups Projects
config.yaml.j2 1.23 KiB
Newer Older
David Mehren's avatar
David Mehren committed
location:
  # List of source directories to backup. Globs are expanded.
{% if borgbackup_source_dirs | length == 0 %}
  source_directories: []
{% else %}
  source_directories:
{% for item in borgbackup_source_dirs %}
    - {{ item }}
{% endfor %}
{% endif %}
David Mehren's avatar
David Mehren committed

  # Paths to local or remote repositories.
  repositories:
  - "ssh://{{ borgbackup_target_user }}@{{ borgbackup_target_ip }}:{{ borgbackup_repo_path }}"
David Mehren's avatar
David Mehren committed

  exclude_patterns:
  {% for item in borgbackup_exclude_dirs %}
  - {{ item }}
  {% endfor %}


storage:
  compression: {{ borgbackup_compression }}
  encryption_passphrase: {{ borgbackup_key }}
  chunker_params: {{ borgbackup_chunker_params }}
David Mehren's avatar
David Mehren committed

retention:
# Retention policy for how many backups to keep in each category.
  keep_within: {{ borgbackup_keep_within }}
  keep_daily: {{ borgbackup_keep_daily }}
  keep_weekly: {{ borgbackup_keep_weekly }}
  keep_monthly: {{ borgbackup_keep_monthly }}
  keep_yearly: {{ borgbackup_keep_yearly }}
David Mehren's avatar
David Mehren committed

consistency:
  checks:
  - repository
  - archives
  check_last: 3

{% if borgbackup_mariadb_enable %}
hooks:
  mysql_databases:
    - name: all
      username: {{ borgbackup_mariadb_user }}
      password: {{ borgbackup_mariadb_password }}
      options: "--single-transaction --quick"
{% endif %}