Score:0

Rolling Backups of .sql files

in flag

I'm having a bunch of docker-containers containing different databases. For every container there is a Jenkins-Job which performs a daily backup of the database as a .sql-file and then zips this file. As you can imagine this leads to a lot of redundant data over time:

-rw-r--r--. 1 admin admin 103475967 30. Aug 02:15 20210830021501_all-databases.sql.gz
-rw-r--r--. 1 admin admin 103475967 31. Aug 02:15 20210831021501_all-databases.sql.gz
-rw-r--r--. 1 admin admin 103475967  1. Sep 02:15 20210901021501_all-databases.sql.gz

Usually you would use the database specific rolling backup tool. But I want to keep things simple and generic by exporting just a .sql-file.

Now I'm looking for a way to just store the diffs of the .sql-files. There are several questions (here and here fore example) leading to rdiff-backup as a good tool for this. But to me it seems like rdiff-backup is designed to work with whole folders, e.g. the folder where the database stores it's data, and not the sql files itself.

Is there a tool to store an database independet init .sql-file and from there on only the diffs.

Score:0
my flag

You can use a different approach, using zpaq. You can find on FreeBSD (very old version), Debian (updated) or directly from the author's website http://mattmahoney.net/dc/zpaq.html

You will get a single file with all the SQL you want, stored inside, optionally encrypted

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.