简体   繁体   English

备份 MySQL InnoDB 表的最佳实践?

[英]best practice for backup MySQL InnoDB tables?

What is the best practice for backing up MySQL InnoDB tables?备份 MySQL InnoDB 表的最佳实践是什么? (for myisam I use backuppc) (对于myisam,我使用backuppc)

How can I do a backup and how can I restore it?如何进行备份以及如何恢复?

Thank you.谢谢你。

mysql> mysqldump -u username -ppassword databasename tablename > Path to save mysql> mysqldump -u username -ppassword databasename tablename > 保存路径

you can schedule in in windows scheduler or in cron job after creating the batch file or SH file.创建批处理文件或 SH 文件后,您可以在 Windows 调度程序或 cron 作业中进行调度。

You can use 'mysqldump' program from MySQL to dump individual tables..您可以使用 MySQL 中的“mysqldump”程序来转储单个表。

shell> mysqldump [options] [tbl_name ...] shell> mysqldump [选项] [tbl_name ...]

To restore the tables use command:要恢复表使用命令:

shell>mysql -uusername -ppassword -f -D databasename < /path/to/file/dbbackup.sql shell>mysql -uusername -ppassword -f -D 数据库名 < /path/to/file/dbbackup.sql

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM