导入 WordPress 备份 - 只恢复丢失的帖子?
一位客户声称,当她删除用户帐户时,她的 WordPress 网站上的一些帖子丢失了。显然,我在数据库中确实找不到这些帖子。 (我首先想到也许它们没有分配给作者)
现在我有几个站点的完整备份作为 SQL 文件。那里有一篇缺失的文章。然而,我们并不确切知道哪些文章丢失了。
我只想恢复丢失的文章。不恢复整个站点。当前文章不应该被删除!
实现这一目标的最佳方法是什么?将其导入到不同的数据库并以某种方式比较 wp_posts? 谢谢你们!
A customer claims some posts on her wordpress site went missing when she deleted user accounts. Apparently, I really cannot find these posts in the database. (I first thought maybe they were not assigned to an author)
Now I have several full backups of the site as SQL files. One missing article is in there. However, we don't know exactly which articles went missing.
I only want to restore the missing articles. Not restore the whole site. Current articles should not be deleted!
What's the best way to achieve this? Import it to a different database and somehow compare wp_posts?
Thanks guys!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以创建一个临时数据库,
并将您的最新备份导入其中。
之后,执行一个
技巧是忽略将忽略覆盖任何现有项目,
这意味着只插入缺少的帖子。
注意:您应该替换所有相关表,而不仅仅是 wp_posts
You can create a temporary database,
and import your latest backup into it.
After that, do a
The trick is the IGNORE will ignore to overwrite any existing items,
which mean only insert the missing posts.
NOTE : you should replace all related tables not just wp_posts alone
嗯……这可能会变得棘手,因为有评论、标签、类别等……等等,但我会这样做,但没有测试它:
p.s.可能值得在 https://wordpress.stackexchange.com/ 上发布!
Hmmmm.... This can get tricky because there are comments, tags, categories, etc.. etc.. but I would do it like this but have not tested it:
p.s. might be worth posting on https://wordpress.stackexchange.com/ !!