简体   繁体   English

导出Drupal内容?

[英]Export Drupal Content?

I want to know what is the easiest way to export ALL content of a specific user in Drupal, by only making use of the database. 我想知道通过仅使用数据库来导出Drupal中特定用户的所有内容的最简单方法是什么。 Is this even possible? 这有可能吗?

Reason being, I moved a site, and now clients created content on the old server, unknowingly, and I need to move it to the new server. 原因是,我移动了一个站点,现在客户端在不知不觉中在旧服务器上创建了内容,因此我需要将其移动到新服务器上。 Unfortunately, the site can't be accessed anymore (due to the move) so I only have access to the database. 不幸的是,由于移动,该站点无法再访问,所以我只能访问数据库。

Should I perhaps look at finding a way to maket the isntallation accessible and then using an export mdoule, or is there an easy way to export using PHPMyAdmin? 我是否应该寻找一种方法来使分词访问变得容易,然后使用导出mdoule,或者是否存在使用PHPMyAdmin进行导出的简单方法?

Ouch 哎哟

You could take the db and set it up on a sandbox somewhere, which would give you access to see what changed. 您可以使用数据库并将其设置在某个位置的沙箱中,这将使您能够查看更改。 Genrally if you have access to a DB (and know which version of drupal and modules you had), you can run a drupal site from it. 通常,如果您有权访问数据库(并知道您拥有的Drupal和模块的版本),则可以从中运行一个Drupal站点。

In an earlier question I suggested the migrate module for getting content from one drupal db to another, I think that appies here. 在先前的问题中,我建议了内容从一个drupal db获取到另一个drupal db的迁移模块,我认为这适用于此。 If you can't get another code base to look at the old DB. 如果您无法获得另一个代码库来查看旧数据库。

Instead of trying to pinpoint the content that a specific user has created, it will probably be a lot easier to get the stuff you need based on the datetime. 与其尝试查明特定用户创建的内容,不如根据日期时间获取所需的内容可能会容易得多。 But it really depends what kind of content that have been created. 但这实际上取决于所创建的内容类型。 If it's just nodes, it should be fairly simple to load the nodes from the one database and save it to the other. 如果只是节点,那么从一个数据库加载节点并将其保存到另一个数据库应该相当简单。

Another thing worth mentioning is that Drupal support having more than one database in your settings. 值得一提的另一件事是,Drupal支持您的设置中包含多个数据库。 You can relatively change the db connection if they are of the same type (eg MYSQL). 如果它们属于同一类型(例如,MYSQL),则可以相对地更改数据库连接。 See the db_set_active function. 请参见db_set_active函数。

You can also try to make use of the migrate modules like Jeremy suggested, which way to go depends a bit on how well your Drupal/PHP/SQL skills are and how tricky it is to get the data you need. 您也可以尝试使用Jeremy建议的迁移模块,该走的路在某种程度上取决于您的Drupal / PHP / SQL技能,以及获取所需数据的难度。

I think this module will help you 我认为该模块将为您提供帮助

data_export_import data_export_import

我知道您已经解决了这个问题,但是backup_migrate模块呢?

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

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