The dream: mysql backups


Is there any tiny fiber in your body that thinks about making restic for mysql?

So that one could browse database backups like you can browse file backups?

I know you already have your hands full with restic file backups, but it keeps being on my mind. I’m so not in love with the current mysql / mariadb backup solutions, restoring alone is already such a pain and does not offer any easy snapshot restores whatsoever.

If only the world would see a backup solution like restic but then for databases… :smile:


While currently don’t plan to build something especially for databases, you can run mysqldump | restic backup --stdin --stdin-filename db.sql and afterwards mount the repository, then you can browse the files and inspect them with an editor… I don’t know, maybe that helps you a bit :slight_smile:


Yeah not really, it’s the restic magic I’m hoping for, you see, restoring single records from a snapshot, that kind of stuff :wink:

It’s just a wish I hope comes true in one way or another.

Keep up the great work, as usual still loving the magic of restic.


Isn’t a database dump just a file with a bunch of CREATEs and INSERTs? And isn’t a database just s bunch of files on disk anyway? Why couldnt restic back those up?


It would be cool if it could be part of a larger single snapshot: “back up the current content of DB x and of directory y” (e.g. Wordpress mysql and uploads folder). Unfortunately, --stdin is mutually exclusive with specifying files.


Well it’s about browsing those creates and inserts in a user-friendly way, with an easy restore procedure, for example: restore this table as it was a week ago, or single rows. The dumps are exactly that, dumps. Not easy to go through and indeed not connected to a snapshot on disk.


I just dump the databases at the same frequency as restic backups, staggered by a few minutes so the dump completes before restic starts.

Dump files are a pain, but the most reasonable way to deal with this is to either set up a quick VM and restore the dump, or if you’re creating separate dumps for each database, restore the dump you’re interested in to a new database on your existing server.

This way, you can browse and use all of the tools that already exist to work with mysql to create an export file of the information you’re looking for, and then import it into your live database.

Trying to add this kind of functionality to restic seems like a lot of work for something that’s easy to work around.