Skip to content

Instantly share code, notes, and snippets.

@Whistler092
Created March 21, 2018 18:36
Show Gist options
  • Save Whistler092/516d9bea872133c621ff31898cfb2372 to your computer and use it in GitHub Desktop.
Save Whistler092/516d9bea872133c621ff31898cfb2372 to your computer and use it in GitHub Desktop.
take bacup from container
crontab -e
0 23 * * * /root/take_backup.sh
#!/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