Last active
March 19, 2023 16:49
-
-
Save royingantaginting/a1c0558bbc5a04ff4e1e to your computer and use it in GitHub Desktop.
Safely dump database with mysqldump. Explanation for each options are the --hex-blob option to convert binary into hexadecimal, the --single-transaction option to lock database during the process, the --triggers option to dump triggers, the
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
mysqldump -u[user] -p --hex-blob --single-transaction --triggers --routines [database name] > [database-name]-`date +%y%m%d-%H%M%S`.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment