Skip to content

Ansible Role - Configure Borg Backup repository and create backups on schedule.

License

Notifications You must be signed in to change notification settings

rremizov/ansible-borg-backup

Repository files navigation

Borg Backup

Configure Borg Backup repository and create backups on schedule.

1   Features

  • Uses BorgBackup to create versioned, deduplicated and encrypted backups.

2   Requirements

  • Debian

3   Role Vars

3.1   borg_backup

Configuration of the Borg repositories. See the schema in the examples below.

4   Example

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.

About

Ansible Role - Configure Borg Backup repository and create backups on schedule.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages