Database dump/restore hooks for MySQL/MariaDB #228

Closed
opened 2019-10-21 00:26:46 +00:00 by witten · 6 comments
Owner

What I'm trying to do and why

If you want to run borgmatic on a system with a database daemon, best practices dictate that you dump the database to file and back that up instead of trying to backup the running database. That way, you get a consistent snapshot.

Today, you can already do that with borgmatic via hand-written before_backup/after_backup hooks. But what if it could be even easier / more built-in, such that you didn’t have to write custom hooks with dump commands?

This ticket is the MariaDB variant of #225 (database hooks for PostgreSQL). See that ticket for more information.

#### What I'm trying to do and why If you want to run borgmatic on a system with a database daemon, best practices dictate that you dump the database to file and back that up instead of trying to backup the running database. That way, you get a consistent snapshot. Today, you can already do that with borgmatic via hand-written before_backup/after_backup hooks. But what if it could be even easier / more built-in, such that you didn’t have to write custom hooks with dump commands? This ticket is the MariaDB variant of #225 (database hooks for PostgreSQL). See that ticket for more information.
witten changed title from Database dump/restore hooks for MariaDB to Database dump/restore hooks for MySQL/MariaDB 2019-11-08 01:36:04 +00:00

@witten Just looking for this and found this, I'm glad this in in the roadmap. Do you have any ETA to this? Thank you!

@witten Just looking for this and found this, I'm glad this in in the roadmap. Do you have any ETA to this? Thank you!
Author
Owner

No specific ETA, but this is pretty high priority at this point. Since this may need to be split into two tickets, I'm curious.. Are you using MySQL or MariaDB? And are your databases local (on the server that borgmatic would run on) or remote? Thanks.

No specific ETA, but this is pretty high priority at this point. Since this may need to be split into two tickets, I'm curious.. Are you using MySQL or MariaDB? And are your databases local (on the server that borgmatic would run on) or remote? Thanks.

I'm running MariaDB in a Docker container, and running Borgmatic on that host machine.

I'm running MariaDB in a Docker container, and running Borgmatic on that host machine.
Author
Owner

Cool, thanks for the info! I'll make sure to test with MariaDB + Docker when this is developed. In the meantime, please check out some of the work-arounds for database dumps if you haven't already seen 'em: https://torsion.org/borgmatic/docs/how-to/backup-your-databases/#preparation-and-cleanup-hooks

Cool, thanks for the info! I'll make sure to test with MariaDB + Docker when this is developed. In the meantime, please check out some of the work-arounds for database dumps if you haven't already seen 'em: https://torsion.org/borgmatic/docs/how-to/backup-your-databases/#preparation-and-cleanup-hooks

Sure, thanks for your kind help! :)

Sure, thanks for your kind help! :)
Author
Owner

Implemented and released in borgmatic 1.4.9.

Implemented and released in borgmatic 1.4.9.
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#228
No description provided.