Dovecot dump/restore hook #834

Open
opened 2024-03-02 00:13:13 +00:00 by nick · 3 comments

What I'd like to do and why

In the before_backup and after_backup hooks, access to borgmatic_source_directory config variable would be useful if the generic hooks need to dump temporary data.

For example, I'm backing up email from Dovecot, which needs to be dumped to a temporary location like a database. So I'd like to be able to use {borgmatic_source_directory}/$somedirectory as my temporary backup directory.

Other notes / implementation ideas

No response

### What I'd like to do and why In the before_backup and after_backup hooks, access to borgmatic_source_directory config variable would be useful if the generic hooks need to dump temporary data. For example, I'm backing up email from Dovecot, which needs to be dumped to a temporary location like a database. So I'd like to be able to use {borgmatic_source_directory}/$somedirectory as my temporary backup directory. ### Other notes / implementation ideas _No response_
Owner

Thanks for taking the time to file this. Even though borgmatic_source_directory is a user-configurable path, I'll admit that I'm a little hesitant to encourage borgmatic users to put files there, as it's currently used only for internal borgmatic state and managed solely by borgmatic. But maybe it would be okay to expose anyway, along with appropriate documented caveats?

As for backing up Dovecot, out of curiosity, what are you using for that? (I'm a Dovecot user too.) doveadm backup? Makes me wonder if there could be a borgmatic hook for Dovecot.

Thanks!

Thanks for taking the time to file this. Even though `borgmatic_source_directory` is a user-configurable path, I'll admit that I'm a little hesitant to encourage borgmatic users to put files there, as it's currently used only for internal borgmatic state and managed solely by borgmatic. But maybe it would be okay to expose anyway, along with appropriate documented caveats? As for backing up Dovecot, out of curiosity, what are you using for that? (I'm a Dovecot user too.) `doveadm backup`? Makes me wonder if there could be a borgmatic hook for Dovecot. Thanks!
Author

After thinking about this some more, I agree you're probably right and this probably isn't actually that helpful anyway.

Yes, I use doveadm backup... and I think it would be an excellent candidate for a hook :-)

After thinking about this some more, I agree you're probably right and this probably isn't actually that helpful anyway. Yes, I use `doveadm backup`... and I think it would be an excellent candidate for a hook :-)
Owner

Got it, thanks! I'll rename this ticket accordingly.

Got it, thanks! I'll rename this ticket accordingly.
witten changed title from Interpolate borgmatic_source_directory in preparation/cleanup hooks to Dovecot dump/restore hook 2024-03-02 19:14:30 +00:00
witten added the
new feature area
label 2024-03-02 19:14:37 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#834
No description provided.