Created
March 21, 2018 18:36
-
-
Save Whistler092/516d9bea872133c621ff31898cfb2372 to your computer and use it in GitHub Desktop.
take bacup from container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crontab -e | |
0 23 * * * /root/take_backup.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATE=`date +%d-%m-%y` | |
PASS=$PASSWORD_DB | |
echo ${DATE} | |
docker exec clubcontador_database_1 /usr/bin/mysqldump -u root --password=${PASS} club_contador > club_contador_${DATE}.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment