<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/2026-easy-database-backups-with-docker-compose-nfrastack-iabowsoe1" -->

---
title: 2026 Easy Database Backups with Docker Compose & Nfrastack
description: A guide walks through setting up automated multi-database backups using the open-source nfrastack/container-db-backup Docker container, which recently...
canonical: https://daily.dev/posts/2026-easy-database-backups-with-docker-compose-nfrastack-iabowsoe1
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 2026 Easy Database Backups with Docker Compose & Nfrastack | daily.dev
og:description: A guide walks through setting up automated multi-database backups using the open-source nfrastack/container-db-backup Docker container, which recently...
og:url: https://daily.dev/posts/2026-easy-database-backups-with-docker-compose-nfrastack-iabowsoe1
og:image: https://api.daily.dev/og/posts/IaBOWSOe1.png
og:image:alt: 2026 Easy Database Backups with Docker Compose & Nfrastack
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026 Easy Database Backups with Docker Compose & Nfrastack

**[Daniel Petrica](https://daily.dev/sources/danielpetrica)** · 4 min read · 0 upvotes · 0 comments

## Summary

A guide walks through setting up automated multi-database backups using the open-source nfrastack/container-db-backup Docker container, which recently refactored to support native multi-job configs via prefixed environment variables (DB01_, DB02_) for MySQL, PostgreSQL, MongoDB, and Redis simultaneously. The setup drops into an existing docker-compose.yml, ships dumps to local storage, S3, or Azure, and the post includes an interactive configurator to generate compose variables and .env files. The author also recommends against long-term local storage of backups and promotes a paid New Relic monitoring setup package.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://danielpetrica.com/posts/easy-database-backups-with-docker-compose>

## Questions this post answers

### How do I configure container-db-backup to back up multiple databases like MySQL and PostgreSQL at the same time?

Container-db-backup supports native multi-job configuration through prefixed environment variables such as DB01_ and DB02_, allowing simultaneous connections to multiple database types including MySQL, PostgreSQL, MongoDB, and Redis. Each job gets its own host, credentials, backup interval, cleanup time, compression method (GZ, ZSTD), and checksum type (SHA1, MD5), all set inside the docker-compose.yml environment block.

_daily.dev helps developers track backup tooling changes like this before a production restore fails._

### Where should I store Docker container database backups instead of keeping them on the same server?

Backups should not be kept long-term on the same server as the database because accumulating dump files can exhaust disk space and take down services if unmonitored. A better approach is to use the backup tool's native S3 integration or mount an external filesystem and point the backup path there, rather than relying solely on a local directory.

_Anyone architecting a backup strategy can compare storage options like this on daily.dev before committing._

## Similar posts on daily.dev

- [How to Back Up PostgreSQL in Docker \(Local, S3, and Plakar\) — Nick Janetakis](https://daily.dev/posts/how-to-back-up-postgresql-in-docker-local-s3-and-plakar-nick-janetakis-l64ac1yno) · Nick Janetakis · 24 upvotes · 2 comments
- [I finally organized my Docker Compose files and saved myself hours of time](https://daily.dev/posts/i-finally-organized-my-docker-compose-files-and-saved-myself-hours-of-time-onm5nqquv) · XDA Developers · 2 upvotes · 0 comments
- [Introduction to Docker Compose](https://daily.dev/posts/introduction-to-docker-compose-auqwyajlu) · Flavio Copes · 11 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql), [#mysql](https://daily.dev/tags/mysql), [#docker-compose](https://daily.dev/tags/docker-compose)

[View this post on daily.dev](https://daily.dev/posts/2026-easy-database-backups-with-docker-compose-nfrastack-iabowsoe1)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"2026 Easy Database Backups with Docker Compose & Nfrastack","url":"https://daily.dev/posts/2026-easy-database-backups-with-docker-compose-nfrastack-iabowsoe1","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/2026-easy-database-backups-with-docker-compose-nfrastack-iabowsoe1"},"datePublished":"2026-09-29T12:32:28.120Z","dateModified":"2026-09-29T12:33:05.240Z","description":"A guide walks through setting up automated multi-database backups using the open-source nfrastack/container-db-backup Docker container, which recently...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/175754a8b2e6dc4801802ec2f59a9e48?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/175754a8b2e6dc4801802ec2f59a9e48?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Daniel Petrica","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Daniel Petrica","logo":"https://media.daily.dev/image/upload/s--jkfwlnJz--/f_auto,q_auto/v1774964393/logos/danielpetrica?_a=BAMAMiWQ0","url":"https://daily.dev/sources/danielpetrica"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/2026-easy-database-backups-with-docker-compose-nfrastack-iabowsoe1","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql,mysql,docker-compose","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Daniel Petrica","item":"https://daily.dev/sources/danielpetrica"},{"@type":"ListItem","position":3,"name":"2026 Easy Database Backups with Docker Compose & Nfrastack"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/2026-easy-database-backups-with-docker-compose-nfrastack-iabowsoe1#faq","mainEntity":[{"@type":"Question","name":"How do I configure container-db-backup to back up multiple databases like MySQL and PostgreSQL at the same time?","acceptedAnswer":{"@type":"Answer","text":"Container-db-backup supports native multi-job configuration through prefixed environment variables such as DB01_ and DB02_, allowing simultaneous connections to multiple database types including MySQL, PostgreSQL, MongoDB, and Redis. Each job gets its own host, credentials, backup interval, cleanup time, compression method (GZ, ZSTD), and checksum type (SHA1, MD5), all set inside the docker-compose.yml environment block. daily.dev helps developers track backup tooling changes like this before a production restore fails."}},{"@type":"Question","name":"Where should I store Docker container database backups instead of keeping them on the same server?","acceptedAnswer":{"@type":"Answer","text":"Backups should not be kept long-term on the same server as the database because accumulating dump files can exhaust disk space and take down services if unmonitored. A better approach is to use the backup tool's native S3 integration or mount an external filesystem and point the backup path there, rather than relying solely on a local directory. Anyone architecting a backup strategy can compare storage options like this on daily.dev before committing."}}]}
```

