Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Easy Automated Docker Volume Backups That Are Database Friendly

I recently picked up a Beelink EQR6 Mini PC to reduce some of the Docker stress on my aging Synology NAS. Since my Synology used the Btrfs filesystem, I never had to worry about file locks and corruption during a backup because that particular file system used copy-on-write (CoW). However, since I decided to use Ubuntu Server on my Mini PC and neglected choosing which filesystem I wanted to use, I ended up with ext4.

Here’s the problem though.

The ext4 filesystem does not support copy-on-write. This means that if I tried to make backups of my Docker volumes, I’d run the risk of file corruption if those files were in use at the time of backup. This is particularly more of a problem with Docker volumes that contain SQLite databases with write-ahead log (WAL) or databases in general.

There’s good news though! There are a few automated solutions for safe backups of Docker volumes that can be used with minimal effort.

Read More