tags:

views:

242

answers:

3

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. 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?

+1  A: 

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.

In an earlier question I suggested the migrate module for getting content from one drupal db to another, I think that appies here. If you can't get another code base to look at the old DB.

Jeremy French
+1  A: 

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. You can relatively change the db connection if they are of the same type (e.g. MYSQL). See the db_set_active function.

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.

googletorp
I ended up doing NODE_LOADs and then NODE SAVES on the new server. Which isn't ideal, but it worked! :-)
RD
Oh... and reason why I did this was because I needed all the various fields and everything to be copied as well.
RD
When it comes to tasks you only need to do once, you don't do find the perfect solution just something that works!
googletorp
A: 

I know you already fixed this, but what about the backup_migrate module?

Mike Crittenden
In this case, that would amount to a carefully orchestrated database dump, which is kind of a firehose approach. It could also break things badly if any content has been added to the new site.
Grayside

related questions