Script to backup MySQL Database
Posted by raxsoOct 10
This is a small script i use to backup MySQl Database, I use it in my everyday system administration job so feel free to use and configure it. This will backup a database and zip the file.
#!/bin/shdate=`date -I`
mysqldump -uroot -ptest123 database | gzip -a > /home/mysql-backup/database-$date.sql.gz
Here is another one if you want to backup all database and zip the file.
Like this blog? Why not buy me a cup of coffee?
#!/bin/shdate=`date -I`
mysqldump -uroot -ptest123 –all-databases | gzip -a > /home/mysql-backup/database-$date.sql.gz









![[hackers black book]](http://raxso.net/images/hbb-ani-misuse.gif)





Leave a Reply