database-backup

database-backup

Docker 应用程序 from GreiteTurtle's Repository

概述

Lightweight Debian Slim image to automate PostgreSQL (12-18), MariaDB/MySQL, and MongoDB backups via cron.

Features:

  • Dynamic client install at startup: only required tools are installed based on your config
  • Flexible cron scheduling per backup job
  • Automatic gzip compression (.sql.gz / .tar.gz) and timestamped files
  • Configurable per-job retention with automatic rotation of old dumps
  • Multiple databases (different types and hosts) handled by a single container
  • Built-in healthcheck verifying connectivity to every configured database
  • Multi-architecture (amd64, arm64) and auto-rebuilt on base image security updates

Setup:

  1. Copy backups.conf.example to your appdata directory and rename to backups.conf
  2. Edit backups.conf with your databases (one job per line, pipe-delimited)
  3. Map the file to /config/backups.conf and a host folder to /backups

See the project README for full configuration syntax and examples.

运行时参数

网络
bridge
外壳
bash
特权
false

模板配置

Backups StoragePathrw

Host path where database dumps are written. Files are organized as type/database/database_timestamp.sql.gz (or .tar.gz for MongoDB).

目标
/backups
默认值
/mnt/user/appdata/database-backup/backups
价值
/mnt/user/appdata/database-backup/backups
Configuration FilePathro

Path to the backups.conf file on the host. Get the example from https://github.com/Greite/database-backup/blob/main/backups.conf.example and edit it before starting the container. One backup job per line, pipe-delimited: CRON_SCHEDULE|TYPE|HOST|PORT|DATABASE|USER|PASSWORD|RETENTION_DAYS|PG_VERSION

目标
/config/backups.conf
默认值
/mnt/user/appdata/database-backup/backups.conf
价值
/mnt/user/appdata/database-backup/backups.conf

详细信息

存储库
ghcr.io/greite/database-backup:latest
最后更新2026-06-02
初见2026-05-12

在Unraid 上运行 database-backup 。

database-backup 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。