Tech News
← Back to articles

Database backups, dump files and restic

read original related products more articles

Some notes on converting my database backups away from intermediary dump files

In the previous article about rethinking my backups I had a TODO item regarding moving away from using intermediary dumps of database content. Here's some notes about that.

The old way

What I used to do in order to back up some MariaDB databases for example was to have a script something like this called regularly:

set - euf set - o pipefail umask 0066 /usr/bin/mysqldump \ -- defaults-extra-file = /etc/mysql/backup_credentials.cnf \ -- single-transaction \ -- databases mysql dss_wp dev_dss_wp \ | /bin/gzip -- best -- rsyncable - c \ > /srv/backup/mariadb/all.sql.gz.new \ && mv /srv/backup/mariadb/all.sql.gz.new /srv/backup/mariadb/all.sql.gz

So, every day the databases get dumped out to /srv/backup/mariadb/all.sql.gz and then at some point that day the backup system picks that file up.

Not ideal

That worked but has a few downsides.

Redundant data storage

The data that's in the database also ends up on disk again, although in a quite well compressed form.

... continue reading