Без опису

Fabian Peter Hammerle 2832e2a897 refactor: use openssh-server's ForceCommand option instead of /tmp/mysqldump.sh 3 роки тому
.github 7761e6e7bd configure github's dependabot to keep base image up-to-date 3 роки тому
CHANGELOG.md f39cdced45 fail early when env var MYSQLDUMP_ARGS is not set 3 роки тому
Dockerfile 2832e2a897 refactor: use openssh-server's ForceCommand option instead of /tmp/mysqldump.sh 3 роки тому
README.md 0565874cd8 listen on port 2200 for consistency among personal projects (previously 2222) 3 роки тому
docker-compose.yml 2832e2a897 refactor: use openssh-server's ForceCommand option instead of /tmp/mysqldump.sh 3 роки тому
entrypoint.sh 2832e2a897 refactor: use openssh-server's ForceCommand option instead of /tmp/mysqldump.sh 3 роки тому
mariadb-client-package-log.url 8093da022f upgrade alpine base image v3.12 -> v13.4 including openssh-server package upgrade v8.3_p1-r0 -> v8.4_p1-r3 & mariadb-client package upgrade v10.4.13-r0 -> v10.5.8-r0 (diff links below) 3 роки тому
openssh-package-log.url 8093da022f upgrade alpine base image v3.12 -> v13.4 including openssh-server package upgrade v8.3_p1-r0 -> v8.4_p1-r3 & mariadb-client package upgrade v10.4.13-r0 -> v10.5.8-r0 (diff links below) 3 роки тому
rsnapshot.conf.example 0565874cd8 listen on port 2200 for consistency among personal projects (previously 2222) 3 роки тому
sshd_config 2832e2a897 refactor: use openssh-server's ForceCommand option instead of /tmp/mysqldump.sh 3 роки тому

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 2200:2200 \
    -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 2200 -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.