ansible-role-borgbackup icon indicating copy to clipboard operation
ansible-role-borgbackup copied to clipboard

MySQL/PostgreSQL backups

Open adeleglise opened this issue 5 years ago • 6 comments

Hi, first of all, thanks for the role it's really helpful.

I saw that you implemented before/after backups commands, but in borgmatic databases dump hooks are native. Is it possible to use them with your role ? It would a shame to use this role and have to deploy a jinja template of the config file just for those commands.

Thanks.

adeleglise avatar Feb 04 '20 10:02 adeleglise

I didn't look into Borgmatic's hooks yet. Great if they cover the majority of use cases.

We probably still want the before/after hooks to run custom commands that Borgmatic may not support yet.

I'm still open to adding options for Borgmatic hooks and improving the docs in this regards.

m3nu avatar Feb 04 '20 14:02 m3nu

I'm still open to adding options for Borgmatic hooks and improving the docs in this regards.

That would be great !

adeleglise avatar Feb 05 '20 15:02 adeleglise

Hi,

i have recently discovered your role. Thank you for your great work.

The integration of the native borgmatic database dump hooks would be very helpful for me.

Can you give us a status if it can be integrated? What are the current alternatives? Should I use before/after hooks or is there a way to use the role and still provide a custom config or other parameters?

Thanks.

sNud avatar Mar 24 '20 15:03 sNud

Can be added. Just edit the Borgmatic config j2 template.

For the param names, we could use this: borgmatic_dump_[mysql|postgres|mariadb]

Possible values

  • empty (default) does nothing
  • all dump all DBs, as per Borgmatic docs
  • db1, db2 (dump specific DBs, not sure how Borgmatic separates them)

m3nu avatar Mar 24 '20 15:03 m3nu

Hey,

do you have an update here? If not, would you @m3nu want to create a PR or should I make one? I'd also be happy to use the PostgreSQL dump feature and not rely on before hooks.

cl1ent avatar Dec 09 '20 22:12 cl1ent

Feel free to contribute a PR, @cl1ent . Bonus points if it's flexible enough to use it with other kinds of hooks.

m3nu avatar Feb 18 '21 15:02 m3nu