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 %} # Paths to local or remote repositories. repositories: - "ssh://{{ borgbackup_target_user }}@{{ borgbackup_target_ip }}:{{ borgbackup_repo_path }}" exclude_patterns: {% for item in borgbackup_exclude_dirs %} - {{ item }} {% endfor %} storage: compression: {{ borgbackup_compression }} encryption_passphrase: {{ borgbackup_key }} chunker_params: {{ borgbackup_chunker_params }} 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 }} 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 %}