I have a long history with open source; I first installed Linux in 1993. I can’t remember when I first contributed to an open-source project, although I believe that happened in the late 90s. As I’ve worked with various organizations over the years, I’ve looked for ways to give back to the community, and now at Layered Insight we’re taking that first step. Today we’re announcing a small but very useful project to backup all databases on a container host: backup_db_containers, now available on Layered Insight’s GitHub page.

Back Up Those Containerized Databases!

As people and organizations containerize more applications, the number of containerized data stores has grown quickly. In our production environments, we have a mixture of PostgreSQL, MariaDB, and Mongo containers. Frequently, the first hard-earned lesson for people working with containers is to ensure the volumes backing these data stores is persistent. Many, though, forget that similar to RAID, a persistent volume is not the same as a backup – when a mistake is made within a container, it doesn’t matter if it’s persisted or not. One either has to recreate the data, or restore from backups.
This is a security thing, too – the “availability” in the CIA triad.
In a previous job, I had a script that would list all databases in a MySQL server, and then iterate through them, backing each up. At first I wrote similar for MariaDB containers at Layered Insight, then I accidentally deleted some data in Mongo (in staging, of course). So the script grew to a collection of scripts. The project is now at a place where I’m happy to share it with others.

More Open Sourcing to Come

This is just one of several projects we’re working on open sourcing. Some are in a “code clean-up” phase, others we’re trying to figure out what we can release and what needs to stay closed – at least for now.  We look forward to continuing to share our work with the community, and incorporating your feedback to provide a better product for everyone!