Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Latest commit

 

History

History
36 lines (28 loc) · 984 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 984 Bytes

Docker pulls

Yappa Mysql Backup Image

Usage

Add the following to your docker-compose.yml file:

backup:
    image: yappabe/mysql-backup
    links:
        - mysql
    environment:
        DBS: db1
        MYSQL_USERNAME: mysqlusername
        MYSQL_PASSWORD: mysqlpassword
        MYSQL_HOST: mysql
        RSYNC_COMMAND: "rsync -avz -e \"ssh -p 2122 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null\" %DIR%/* user@host:/backup_path"
        CRON_TIME: "0 17 * * *"
        NOTIFICATION_SERVICE: slack
        SLACK_HOOK_URL: "https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXXXXXX"
        SLACK_CHANNEL: "#general"
        SLACK_USERNAME: "container-mysql-backup"
        SLACK_EMOJI: "package"

The container isn't authorized to access the remote server

You can generate/add or mount a private key:

volumes:
        - ~/.ssh/id_rsa:/root/.ssh/id_rsa