在linux中自动备份MySQL数据(Automatic backup of MySQL data in linux)

编程入门 行业动态 更新时间:2024-10-27 18:32:30
在linux中自动备份MySQL数据(Automatic backup of MySQL data in linux) mysql

我一直在寻找一个简单的脚本来自动备份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.sql

Can 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

更多推荐

本文发布于:2023-08-03 03:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1383124.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自动备份   数据   MySQL   linux   backup

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!