borgmatic_timer_cron_name needed for systemd timers
Hi,
I call this role twice to set up two borg configs, one large config for a local drive, one small config for a remote server,
I use
ansible.builtin.include_role:
name: borgbase.ansible_role_borgbackup
vars:
borgmatic_timer_cron_name: "borgmatic-local"
borgmatic_config_name: "config-local.yaml"
borg_source_directories: "{{ borg_source_directories_local }}" (everything)
ansible.builtin.include_role:
name: borgbase.ansible_role_borgbackup
vars:
borgmatic_timer_cron_name: "borgmatic-remote"
borgmatic_config_name: "config-remote.yaml"
borg_source_directories: "{{ borg_source_directories_local }}" (just the stuff I can't afford to lose)
in different invocations of the role.
This option seems to have disappeared from the docs, though it's still implemented: https://github.com/borgbase/ansible-role-borgbackup/blob/efa8e5ec7f1687239767a03ca7e98a5ed7f1a9b2/defaults/main.yml#L20
The problem that I have is it's not implemented for the systemd timer, so I can't move across to that.
Is it planned to implemented? Or is there a better way to call multiple destinations with a different set of files?
Cheers!
You mean the option is not in the spec file? That file isn't fully complete, we can add it back. Only this one? borgmatic_timer_cron_name
yes, but it needs to be implemented for the systemd timer as well or it's not possible to have two backups.. - they compete with each other for the timer
Does this mean that this role is not intended to be used multiple times? I wanted to use it for one repo per application in my Ansible script as described here: https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/