# github.com/tiredofit/docker-db-backup [![GitHub release](https://img.shields.io/github/v/tag/tiredofit/docker-db-backup?style=flat-square)](https://github.com/tiredofit/docker-db-backup/releases/latest) [![Build Status](https://img.shields.io/github/actions/workflow/status/tiredofit/docker-db-backup/main.yml?branch=main&style=flat-square)](https://github.com/tiredofit/docker-db-backup/actions) [![Docker Stars](https://img.shields.io/docker/stars/tiredofit/db-backup.svg?style=flat-square&logo=docker)](https://hub.docker.com/r/tiredofit/db-backup/) [![Docker Pulls](https://img.shields.io/docker/pulls/tiredofit/db-backup.svg?style=flat-square&logo=docker)](https://hub.docker.com/r/tiredofit/db-backup/) [![Become a sponsor](https://img.shields.io/badge/sponsor-tiredofit-181717.svg?logo=github&style=flat-square)](https://www.tiredofit.ca/sponsor) [![Paypal Donate](https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal&style=flat-square)](https://www.paypal.me/tiredofit) --- ## About This will build a container for backing up multiple types of DB Servers Backs up CouchDB, InfluxDB, MySQL/MariaDB, Microsoft SQL, MongoDB, Postgres, Redis servers. - dump to local filesystem or backup to S3 Compatible services, and Azure. - multiple backup job support - selectable when to start the first dump, whether time of day or relative to container start time - selectable interval - selectable omit scheduling during periods of time - selectable database user and password - selectable cleanup and archive capabilities - selectable database name support - all databases, single, or multiple databases - backup all to separate files or one singular file - checksum support choose to have an MD5 or SHA1 hash generated after backup for verification - compression support (none, gz, bz, xz, zstd) - encryption support (passphrase and public key) - notify upon job failure to email, matrix, mattermost, rocketchat, custom script - zabbix metrics support - hooks to execute pre and post backup job for customization purposes - companion script to aid in restores ## Maintainer - [Dave Conroy](https://github.com/tiredofit) ## Table of Contents - [About](#about) - [Maintainer](#maintainer) - [Table of Contents](#table-of-contents) - [Prerequisites and Assumptions](#prerequisites-and-assumptions) - [Installation](#installation) - [Build from Source](#build-from-source) - [Prebuilt Images](#prebuilt-images) - [Multi Architecture](#multi-architecture) - [Configuration](#configuration) - [Quick Start](#quick-start) - [Persistent Storage](#persistent-storage) - [Environment Variables](#environment-variables) - [Base Images used](#base-images-used) - [Container Options](#container-options) - [Job Defaults](#job-defaults) - [Compression Options](#compression-options) - [Encryption Options](#encryption-options) - [Scheduling Options](#scheduling-options) - [Default Database Options](#default-database-options) - [CouchDB](#couchdb) - [InfluxDB](#influxdb) - [MariaDB/MySQL](#mariadbmysql) - [Microsoft SQL](#microsoft-sql) - [MongoDB](#mongodb) - [Postgresql](#postgresql) - [Redis](#redis) - [Default Storage Options](#default-storage-options) - [Filesystem](#filesystem) - [S3](#s3) - [Azure](#azure) - [Hooks](#hooks) - [Path Options](#path-options) - [Pre Backup](#pre-backup) - [Post backup](#post-backup) - [Job Backup Options](#job-backup-options) - [Compression Options](#compression-options-1) - [Encryption Options](#encryption-options-1) - [Scheduling Options](#scheduling-options-1) - [Specific Database Options](#specific-database-options) - [CouchDB](#couchdb-1) - [InfluxDB](#influxdb-1) - [MariaDB/MySQL](#mariadbmysql-1) - [Microsoft SQL](#microsoft-sql-1) - [MongoDB](#mongodb-1) - [Postgresql](#postgresql-1) - [Redis](#redis-1) - [SQLite](#sqlite) - [Specific Storage Options](#specific-storage-options) - [Filesystem](#filesystem-1) - [S3](#s3-1) - [Azure](#azure-1) - [Hooks](#hooks-1) - [Path Options](#path-options-1) - [Pre Backup](#pre-backup-1) - [Post backup](#post-backup-1) - [Notifications](#notifications) - [Custom Notifications](#custom-notifications) - [Email Notifications](#email-notifications) - [Matrix Notifications](#matrix-notifications) - [Mattermost Notifications](#mattermost-notifications) - [Rocketchat Notifications](#rocketchat-notifications) - [Maintenance](#maintenance) - [Shell Access](#shell-access) - [Manual Backups](#manual-backups) - [Restoring Databases](#restoring-databases) - [Support](#support) - [Usage](#usage) - [Bugfixes](#bugfixes) - [Feature Requests](#feature-requests) - [Updates](#updates) - [License](#license) ## Prerequisites and Assumptions - You must have a working connection to one of the supported DB Servers and appropriate credentials ## Installation ### Build from Source Clone this repository and build the image with `docker build