No Description

Fabian Peter Hammerle b7a3fc6a2b docker-compose: added memory & cpu limit 1 month ago
CHANGELOG.md 50c2fd3d92 release v1.0.0 8 months ago
Dockerfile 1df2d4904c upgrade base image alpine v3.11 -> v3.12 1 month ago
README.md 7fa57b083a readme: added link to signed docker image digests 8 months ago
docker-compose.yml b7a3fc6a2b docker-compose: added memory & cpu limit 1 month ago
entrypoint.sh 8cec374dcd init mysqldump-sshd from rsync-sshd repo 8 months ago
rsnapshot.conf.example 8cec374dcd init mysqldump-sshd from rsync-sshd repo 8 months ago
sshd_config 8cec374dcd init mysqldump-sshd from rsync-sshd repo 8 months ago

README.md

docker: openssh-server invoking mysqldump 💾 🐳

Create logical backups of mariadb and mysql databases via SSH.

Whenever a SSH client connects mysqldump will be executed.

Useful to fetch backups via rsnapshot. See rsnapshot.conf.example.

$ sudo docker run --rm \
    -p 2222:2222 \
    -v /some/path/authorized_keys:/home/dump/.ssh/authorized_keys:ro \
    -e MYSQLDUMP_ARGS='--host=dbhost --user=dbuser --password=dbpass --all-databases' \
    fphammerle/mysqldump-sshd
$ ssh -p 2222 -T dump@localhost
-- MariaDB dump 10.17  Distrib 10.4.10-MariaDB, for Linux (x86_64)
--
-- Host: database    Database: demo
-- ------------------------------------------------------
[…]

Git tags docker/* contain signed docker image digests: https://github.com/fphammerle/docker-mysqldump-sshd/tags

Docker Compose 🐙

  1. git clone https://github.com/fphammerle/docker-mysqldump-sshd
  2. cd docker-mysqldump-sshd
  3. Adapt $MYSQLDUMP_ARGS in docker-compose.yml
  4. docker-compose up --build
  5. Add authorized_keys to docker volume mysqldumpsshd_authorized_keys.