0

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.

Someone2
  • 103
  • 1

1 Answers1

0

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