Last active
May 30, 2018 06:45
-
-
Save fnkr/64744dbf789aaf4e46c5ca5eb7a4aa7d to your computer and use it in GitHub Desktop.
MySQL/MariaDB server backup in 147 chars
This file contains 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
echo 'show databases;' | sudo mysql | tail -n+2 | grep -v _schema$ | grep -v ^mysql$ | xargs -n 1 -I _ bash -c 'sudo mysqldump _ | gzip > _.sql.gz' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment