https://github.com/rremizov/ansible-borg-backup
Ansible Role - Configure Borg Backup repository and create backups on schedule.
https://github.com/rremizov/ansible-borg-backup
ansible ansible-role backup borgbackup
Last synced: 6 months ago
JSON representation
Ansible Role - Configure Borg Backup repository and create backups on schedule.
- Host: GitHub
- URL: https://github.com/rremizov/ansible-borg-backup
- Owner: rremizov
- License: mit
- Created: 2020-04-13T07:18:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-08T18:58:21.000Z (over 1 year ago)
- Last Synced: 2025-01-08T19:45:45.001Z (over 1 year ago)
- Topics: ansible, ansible-role, backup, borgbackup
- Language: Jinja
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. sectnum::
Borg Backup
===========
Configure Borg Backup repository and create backups on schedule.
Features
--------
- Uses `BorgBackup`_ to create versioned, deduplicated and encrypted backups.
Requirements
------------
- Debian
Role Vars
---------
``borg_backup``
~~~~~~~~~~~~~~~
Configuration of the Borg repositories. See the schema in the examples below.
Example
-------
.. code:: yaml
borg_backup:
- directory: / # The directory to backup
borg_repository: /var/backups/root/ # Path to the borg repository.
borg_passphrase: passphrase # BEWARE! Stored in plain text in the backup script! Optional.
borg_umask: "0027" # Default: "0077"
initialize_borg_repo: yes # Default: yes.
borg_exclude: # Optional.
- /var/backups
- /boot
- /dev
- /home
- /proc
- /run
- /tmp
- /sys
cron_month: "*"
cron_weekday: "*"
cron_day: "*"
cron_hour: "0"
cron_minute: "0"
suppress_mail_on_success: no # Use chronic to suppress unwanted mail from cron. Default: yes.
retention_within: 1d # Keep all archives within this interval.
retention_hourly: 24 # Number of hourly archives to keep.
retention_daily: 30 # Number of daily archives to keep.
retention_weekly: 12 # Number of weekly archives to keep.
retention_monthly: 12 # Number of monthly archives to keep.
retention_yearly: 3 # Number of yearly archives to keep.
post_backup_hook: # Optional. Bash snippet to execute after a backup.
.. _BorgBackup: https://github.com/borgbackup