Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
1 result

Target

Select target project
  • ansible/roles/borgbackup
1 result
Select Git revision
  • main
1 result
Show changes
Commits on Source (1)
location: source_directories:
source_directories: - /mnt/source
- /mnt/source repositories:
repositories: - path: /mnt/borg-repository
- /mnt/borg-repository label: local
{% if application_remote_repo %} {% if application_remote_repo %}
- {{ application_remote_repo }} - path: {{ application_remote_repo }}
label: remote
{% endif %} {% endif %}
one_file_system: true one_file_system: true
exclude_patterns: exclude_patterns:
- '*.log' - '*.log'
- '*.pyc' - '*.pyc'
- '*/.git' - '*/.git'
- '*/.svn' - '*/.svn'
- '*/vendor/*' - '*/vendor/*'
- '*/node_modules/*' - '*/node_modules/*'
exclude_caches: true exclude_caches: true
exclude_if_present: '.nobackup' exclude_if_present:
storage: - '.nobackup'
encryption_passphrase: '{{ borg_passphrase }}' encryption_passphrase: '{{ borg_passphrase }}'
retries: {{ borgbackup.retries|default(1) }} retries: {{ borgbackup.retries|default(1) }}
retry_wait: 300 retry_wait: 300
retention: keep_daily: 7
keep_daily: 7 keep_weekly: 8
keep_weekly: 8 keep_monthly: 12
keep_monthly: 12 keep_yearly: 30
keep_yearly: 30 checks:
consistency: - name: repository
checks: - name: archives
- repository
- archives
hooks:
{% if application_db is defined %} {% if application_db is defined %}
mysql_databases: mysql_databases:
- name: '{{ application_db }}' - name: '{{ application_db }}'
hostname: db hostname: db
port: 3306 port: 3306
username: '{{ application_db }}' username: '{{ application_db }}'
password: '{{ application_db }}' password: '{{ application_db }}'
options: '--skip-comments --no-tablespaces' options: '--skip-comments --no-tablespaces'
{% endif %} {% endif %}
before_backup: before_backup:
- echo "`date` - Starting backup" - echo "`date` - Starting backup"
after_backup: after_backup:
- echo "`date` - Finished backup" - echo "`date` - Finished backup"
{% if alerta_apikey is defined %} {% if alerta_apikey is defined %}
on_error: on_error:
- echo -n '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}' | nc -u -w1 alerta {{ alerta_proxy_port|default(20002) }} - echo -n '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}' | nc -u -w1 alerta {{ alerta_proxy_port|default(20002) }}
{% endif %} {% endif %}
location: source_directories:
source_directories:
{% if application_mountpoints|default(false) %} {% if application_mountpoints|default(false) %}
{% for mountpoint in application_mountpoints %} {% for mountpoint in application_mountpoints %}
- {{ mountpoint.path }} - {{ mountpoint.path }}
{% endfor %} {% endfor %}
{% else %} {% else %}
- {{ application_dir }} - {{ application_dir }}
{% endif %} {% endif %}
repositories: repositories:
{% if not application_disable_local %} {% if not application_disable_local %}
- /var/backups/borg/{{ application }}_{{ application_id }} - path: /var/backups/borg/{{ application }}_{{ application_id }}
label: local
{% endif %} {% endif %}
{% if application_remote_repo %} {% if application_remote_repo %}
- {{ application_remote_repo }} - path: {{ application_remote_repo }}
label: remote
{% endif %} {% endif %}
one_file_system: true one_file_system: true
exclude_patterns: exclude_patterns:
- '*.log' - '*.log'
- '*.pyc' - '*.pyc'
- '*/.git' - '*/.git'
- '*/.svn' - '*/.svn'
- '*/vendor/*' - '*/vendor/*'
- '*/node_modules/*' - '*/node_modules/*'
exclude_caches: true exclude_caches: true
exclude_if_present: '.nobackup' exclude_if_present:
storage: - '.nobackup'
encryption_passphrase: '{{ borgbackup.passphrase }}' encryption_passphrase: '{{ borgbackup.passphrase }}'
retries: {{ borgbackup.retries|default(1) }} retries: {{ borgbackup.retries|default(1) }}
retry_wait: 300 retry_wait: 300
retention: keep_daily: 7
keep_daily: 7 keep_weekly: 8
keep_weekly: 8 keep_monthly: 12
keep_monthly: 12 keep_yearly: 30
keep_yearly: 30 checks:
consistency: - name: repository
checks: - name: archives
- repository before_backup:
- archives - echo "`date` - Starting backup"
hooks: after_backup:
before_backup: - echo "`date` - Finished backup"
- echo "`date` - Starting backup" on_error:
after_backup: - /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'
- echo "`date` - Finished backup"
on_error:
- /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'
location: source_directories:
source_directories:
{% if application_mountpoints|default(false) %} {% if application_mountpoints|default(false) %}
{% for mountpoint in application_mountpoints %} {% for mountpoint in application_mountpoints %}
- {{ mountpoint.path }} - {{ mountpoint.path }}
{% endfor %} {% endfor %}
{% else %} {% else %}
- {{ application_dir }} - {{ application_dir }}
{% endif %} {% endif %}
repositories: repositories:
- /var/backups/borg/{{ application }}_{{ application_id }} - path: /var/backups/borg/{{ application }}_{{ application_id }}
one_file_system: true label: local
exclude_patterns: one_file_system: true
- '*.log' exclude_patterns:
- '*.pyc' - '*.log'
- '*/.git' - '*.pyc'
- '*/.svn' - '*/.git'
- '*/vendor/*' - '*/.svn'
- '*/node_modules/*' - '*/vendor/*'
exclude_caches: true - '*/node_modules/*'
exclude_if_present: '.nobackup' exclude_caches: true
storage: exclude_if_present:
encryption_passphrase: '{{ borgbackup.passphrase }}' - '.nobackup'
retries: 1 encryption_passphrase: '{{ borgbackup.passphrase }}'
retry_wait: 300 retries: 1
retention: retry_wait: 300
keep_daily: 7 keep_daily: 7
keep_weekly: 8 keep_weekly: 8
keep_monthly: 12 keep_monthly: 12
keep_yearly: 30 keep_yearly: 30
consistency: checks:
checks: - name: archives
- archives - name: data
- data - name: repository
- repository before_backup:
hooks: - echo "`date` - Starting backup"
before_backup: after_backup:
- echo "`date` - Starting backup" - echo "`date` - Finished backup"
after_backup: on_error:
- echo "`date` - Finished backup" - /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'
on_error:
- /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'
location: source_directories:
source_directories: - /etc
- /etc
{% for dir in backup_include|default([]) %} {% for dir in backup_include|default([]) %}
- {{ dir }} - {{ dir }}
{% endfor %} {% endfor %}
{% if groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql'] %} {% if groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql'] %}
- /var/backups/mysql - /var/backups/mysql
{% endif %} {% endif %}
repositories: repositories:
- /var/backups/borg/default - path: /var/backups/borg/default
one_file_system: true label: local
exclude_patterns: one_file_system: true
- '*.log' exclude_patterns:
- '*.pyc' - '*.log'
- '*/.git' - '*.pyc'
- '*/.svn' - '*/.git'
- '*/vendor/*' - '*/.svn'
- '*/node_modules/*' - '*/vendor/*'
exclude_caches: true - '*/node_modules/*'
exclude_if_present: '.nobackup' exclude_caches: true
storage: exclude_if_present:
encryption_passphrase: '{{ borgbackup.passphrase }}' - '.nobackup'
retries: 1 encryption_passphrase: '{{ borgbackup.passphrase }}'
retry_wait: 300 retries: 1
retention: retry_wait: 300
keep_daily: 7 keep_daily: 7
keep_weekly: 8 keep_weekly: 8
keep_monthly: 12 keep_monthly: 12
keep_yearly: 30 keep_yearly: 30
consistency: checks:
checks: - name: archives
- archives - name: data
- data - name: repository
- repository before_backup:
hooks: - echo "`date` - Starting backup"
before_backup: after_backup:
- echo "`date` - Starting backup" - echo "`date` - Finished backup"
after_backup: on_error:
- echo "`date` - Finished backup" - /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'
on_error:
- /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'
location: source_directories:
source_directories: - /etc
- /etc
{% for dir in backup_include|default([]) %} {% for dir in backup_include|default([]) %}
- {{ dir }} - {{ dir }}
{% endfor %} {% endfor %}
{% if groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql'] %} {% if groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql'] %}
- /var/backups/mysql - /var/backups/mysql
{% endif %} {% endif %}
repositories: repositories:
{% if not borgbackup.disable_local|default(false) %} {% if not borgbackup.disable_local|default(false) %}
- /var/backups/borg/default - path: /var/backups/borg/default
label: local
{% endif %} {% endif %}
{% if borgbackup.remote_repo is defined %} {% if borgbackup.remote_repo is defined %}
- {{ borgbackup.remote_repo }} - path: {{ borgbackup.remote_repo }}
label: remote
{% endif %} {% endif %}
one_file_system: true one_file_system: true
exclude_patterns: exclude_patterns:
- '*.log' - '*.log'
- '*.pyc' - '*.pyc'
- '*/.git' - '*/.git'
- '*/.svn' - '*/.svn'
- '*/vendor/*' - '*/vendor/*'
- '*/node_modules/*' - '*/node_modules/*'
exclude_caches: true exclude_caches: true
exclude_if_present: '.nobackup' exclude_if_present:
storage: - '.nobackup'
encryption_passphrase: '{{ borgbackup.passphrase }}' encryption_passphrase: '{{ borgbackup.passphrase }}'
retries: 1 retries: 1
retry_wait: 300 retry_wait: 300
retention: keep_daily: 7
keep_daily: 7 keep_weekly: 8
keep_weekly: 8 keep_monthly: 12
keep_monthly: 12 keep_yearly: 30
keep_yearly: 30 checks:
consistency: - name: repository
checks: - name: archives
- repository before_backup:
- archives - echo "`date` - Starting backup"
hooks: after_backup:
before_backup: - echo "`date` - Finished backup"
- echo "`date` - Starting backup" on_error:
after_backup: - /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'
- echo "`date` - Finished backup"
on_error:
- /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{repository}","text":"Borg {configuration_filename}","rawData":"{output}"}'