如何仅备份我网站中的评论
在我的网站上添加了许多评论,同时我在本地主机上进行了改进。现在我想将数据库从我的系统传输到在线网站。
我想保留在线添加的评论。我该怎么做?
In my website many comments have been added, while I worked on improvements at my localhost. Now I want to transfer the database from my system to the online website.
I want to retain the comments added online. How can I do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会进行此操作以确保其正常工作,但安装备份和迁移并创建一个仅支持的配置文件查看
comments
表。在实时主机上手动运行备份,并在开发主机上恢复它。复杂的是任何其他实现 的模块hook_comment 并将内容存储在其他地方。
I would stage this to make sure it works properly, but install Backup and Migrate and create a profile that only backs up the
comments
table. Run the backup manually on the live host, and restore it on the devel host.The complication would be any other modules that implement hook_comment and store things elsewhere.
您需要确保两个数据库中的评论表相同。对数据进行 mysql 转储,然后导入转储即可为您完成此操作。
You need to ensure that the comments table in both databases are the same. Doing a mysql dump of the data, and then importing the dump would do this for you.