4

I'm debating between using Feeds module and Backup and Migrate and I'm not sure which would be the best option here.

Here's the scenario - I've two versions of the same site - both drupal 7, both have the same content types and taxonomy structure. One is live, one is on a development server. Due to some unclear communication a bunch of content edits were added to the live site that need to be merged in to the development site where we've made major improvements with Views and several stylistic changes, so we can't just dump the database and then move it without wiping out all the new content on the live site.

So does anyone have a good idea on how to best move JUST the content tables from the database? I know it will be different from install to install, but if you could help me get an idea of what to look for I can use the backup and migrate module and just exclude every table except those which I need.

Thanks in advance.

  • there really is no easy way. Figure out the tables you need: node, node_revision, field_* ... for your content and move them. It's best not to get in this situation because it's a PITA. – tenken Sep 11 '13 at 23:04
5

Node export is the best option to take backup for contents. One click export, import for the particular content types.

This module allows users to export nodes and then import it into another Drupal installation, or on the same site.

Using this module you can save yourself a lot of time setting up new websites that have similar nodes to websites you've already made, migrating nodes to new Drupal versions, or between development/staging/production sites.

You will need the same content types for the imports to work (unless using Feeds to import), and ideally relevant compatibility with fields, and modules.

  • This is ultimately what I used. I remember something similar for drupal 6 to 7 upgrades and this did the trick. – Rob Orr Sep 12 '13 at 18:26
  • I was wondering if node export works with field_groups but it seems to. – Andrew Welch Jan 6 '17 at 15:30
2

You can also use feature module to import functionality from one site to another site.

The features module enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together satisfy a certain use-case. Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module. A feature module is like any other Drupal module except that it declares its components (e.g. views, contexts, CCK fields, etc.) in its .info file so that it can be checked, updated, or reverted programmatically.

Yon can export your views from deveolpment version of your site using feature module. It will export views into module and you can install this module like the other module into live site and views will be activate into your live site.

There are some feature related module which extend the functionality of the feature module.

1

Backup and Migrate won't help you here.

Options:

  1. You could certainly use Feeds.
  2. You could use Deploy (probably with UUID).
  3. You could move the content manually.

Honestly, if the amount of content is under fifty-or-so nodes, I would do it manually, and call it a lesson learned. You can be done in an hour or two, and that'll be quicker than learning how to set this up with either of the other two options. Of course, if you want to learn some new tools (and probably use them in the future), options 1 and 2 would be the way to go.

1

For your specific scenario, Jayendra's answer is best; you should accept that answer, and do as he said (move your updated views to the live server rather than try to move just the content from live to dev). This is standard for Drupal.

If you want to move just the content, try Drupal to Drupal Migration, or one of the other answers -- but using features will be easiest.

0

You can use https://drupal.org/project/views_data_export to export your terms and nodes to XML into 2 separate feeds.

Then Feeds and https://drupal.org/project/feeds_xpathparser to import the content.

You can also export into CSV and import using Feeds' CSV parser. That will work for simple cases, but multi-valued fields can be problematic.

Deploy is great, but it's a lot more work to setup for a one-off job.

0

It really depends on how complex your data is and what you want saved. If its just a couple of fields then you could create a view that has all the data in it. Copy it into excel then import it using feeds into your new site. It sounds messy but I imported more then 4000 nodes into a site this way and it only took an hour to setup, export then import. There are more complex ways of exporting the data using different modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.