Last active
October 10, 2020 14:09
-
-
Save lakhbawa/be2d79ea55386ef5f3e6dc4e71877cfe to your computer and use it in GitHub Desktop.
Mysql backup database from Running Container with Time and Date
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
# Backup the Database | |
docker exec CONTAINER mkdir -p /backups | mysqldump -u root --password='PASSWORD_HERE' DATEBASE_NAME_HERE | gzip > /backups/backup_DATABASE_NAME_$(date +%Y_%m_%d__%H_%M_%S).sql.gz | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment