enzingerm / snapborg

Synchronize snapper snapshots to a borg repository
GNU General Public License v3.0
31 stars 5 forks source link

Allow multiple borg repos per snapper config #6

Open enzingerm opened 2 years ago

enzingerm commented 2 years ago

There are use-cases where one would want to backup the same snapper config to multiple borg repositories, possibly with different encryption/retention settings. This is not possible at the moment, as snapborg_backup=true is written to the snapper snapshot userdata as soon as it has been backed up and this is obviously too little information if we have multiple borg repos.

This could be solved in 3 ways:

jrabinow commented 2 years ago

I think that adding backup info to the snapper userdata is probably not the way to go here, as there's many edge cases to handle. Off the top of my head:

There's probably a few more, but in any case, adding metadata to snapper doesn't seem to me like it'll be a clean approach overall. If the purpose is just to determine which snapshots are already backed up, I would vote for using borg as source of truth. If there's any chance that this metadata might be extended in the future to include other info, I would vote for a new, separate db.

Just my $.02