Last active
August 29, 2016 06:33
-
-
Save gggauravgandhi/dd66aa0004016f206371480ef60fb20b to your computer and use it in GitHub Desktop.
Generate sql dump file.
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/bash | |
printf "Enter host name : " | |
read host_name | |
printf "Enter database name : " | |
read db_name | |
printf "Enter username name : " | |
read username | |
filename='db_backup.sql.gz' | |
mysqldump -h $host_name -u $db_name -p $db_name | gzip > $filename | |
echo "Your file is ready at: $filename" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment