Last active
August 29, 2017 22:58
-
-
Save islander/5b8b4dc3b2ba1b7f6a52dbdb91176903 to your computer and use it in GitHub Desktop.
Save MySQL functions, procedures and triggres
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/sh | |
| # Save MySQL functions, procedures and triggres | |
| DBNAME=$1 | |
| DUMPFILE=/var/backup/mysql/$DBNAME/routines.sql | |
| mkdir -p /var/backup/mysql/$DBNAME/ | |
| mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt $DBNAME > $DUMPFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment