我一直在寻找一个简单的脚本来自动备份Linux中的MySQL数据(每周一次)但是找不到我想要的东西。 我正在手动备份:
mysqldump -u root -ppassword billing -r "/file/private/billing_backup.sql你能指导一下执行自动备份的简单脚本吗?
I've been searching for an easy script to backup MySQL data in Linux automatically (weekly basis) but couldn't find something clear to me. I am doing the back up manually:
mysqldump -u root -ppassword billing -r "/file/private/billing_backup.sqlCan you please guide me to an easy script that perform the automatic backup?
最满意答案
我猜你可以在脚本中抛出你自己提供的命令,并将其添加到cron中。 有关如何执行此操作的说明,请参见http://www.scrounge.org/linux/cron.html 。
每次都会覆盖/file/private/billing_backup.sql; 您可以使用带时间戳的文件名来避免这种情况
I guess you can throw the command you provided yourself in a script, and add that to cron. See http://www.scrounge.org/linux/cron.html for instructions on how to do that.
This'll overwrite /file/private/billing_backup.sql every time; you can use timestamped filenames to avoid that
更多推荐
发布评论