Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
To backup all the databases in the server as separate individual sql files
#Author : Arunlal A
echo "Staring database backup process..."
for db in `echo 'show databases;' |mysql |grep -Ev "Database|information_schema|performance_schema"`; do mysqldump $db | gzip > /backup/$db.sql.gz ;done
echo "Done! Check /backup/ directory for your SQL files."

This comment has been minimized.

Copy link
Owner Author

ashokarun commented Oct 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.