roles-ansible/ansible_role_restic

Backing up multiple paths

Closed this issue · 0 comments

Before diving in the code to make the necessary changes:

I would like to be able to supply different folders for a backup. This actually seems to work for the backup if I specify like this:

restic_backups:
  nas:
    src: "'/nas/projects /nas/homes'"

but it will fail for the forget phase, where restic forget would need:
--path /nas/projects --path /nas/homes

I guess it will also not work on any of the LVM changes which were merged recently.
I'd prefer not to have different jobs, as they may block eachother.

Ideally, I think it would be nice to support an array in src like this

restic_backups:
  nas:
    src: 
      - /nas/projects
      - /nas/homes

Just wondering if anyone else is interested and what would be the cleanest way to proceed, because the logic with stdin/path/... is already quite complicated.