Skip to content

conrad784/ansible-role-borgbackup-customizable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: BorgBackup

Tis is an Ansible Role that sets up automated remote backups on the target machine. It uses BorgBackup with systemd timers and service files. Currently tested on Debian.

Role Variables

Required Arguments

  • borg_repository: Full path to repository.
  • borg_source_directories: List of local folders to back up.
  • borg_passphrase: Password to use for repokey.

Optional Arguments

  • borg_rsh: Remote shell options.
  • borg_time: systemd time pattern See documentation for more.
  • borg_exclude_from: Read exclude patterns from a files.
  • borg_one_file_system: Don't cross file-system boundaries. Defaults to false
  • borg_exclude_patterns: List of paths or patterns to exclude from backup. See official documentation for more.
  • borg_scripts_directory: Location where the backup scripts should be stored.
  • borg_check_dow: Day Of Week the check should be run on.

Most of the variables can be global and also variable for the individual backupjobs.

Example Playbook

- hosts: webservers
  roles:
  - role: borgbackup-customizable
    borg_scripts_directory: "/root/borg-scripts"
	borg_rsh: "ssh -i ~/.ssh/backup_key -oBatchMode=yes"
	borg_time: "*-*-* 06:00:00"
	borg_exclude_from: "/etc/borg_excludelist"

    borgbackup_jobs:
      - name: "borgHome"
        borg_passphrase: CHANGEME
        borg_repository: backupserver:/backupSpace/{{ ansible_hostname }}/borgHome
        borg_source_directories:
         - /home
        borg_exclude_patterns:
          - "*/Cache"
          - "*/cache"
        borg_rsh: "ssh -i ~/.ssh/backup_key -oBatchMode=yes"

License

MIT

Author

Conrad Sachweh.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages