Hi all,
I had an idea for a new drupal module and I'm wondering if anyone else likes the idea enough to discuss the work involved and perhaps work on it with me. Or someone may know if this already exists and can just point me to the right direction.
- Module synopsis
A module that will export/import a filtered set of supported nodes, with the option to include attachments, comments and revisions. Essentially a node migration module.
- Problem this solves
I often want to copy a live site, database and all, to a dev site where a group of people can add new information to the dev site. But while content is being added to the dev site the live site continues on with new comments and news added so it is difficult/impossible to just copy the dev database back to the live database.
- Proposed solution
The node migration module would allow you to filter your nodes on your dev site by author, date created, base path, menu descendants. It would then generate a data file of the selected nodes (or possibly just a url, to deal with upload limitations of large data files in php) that could then be imported into the live site.
This could not support every type of node since it is not explicit what data needs to be collected to recreate the node. However, we could begin by supporting cck nodes with the generic field types and at the same time supply an api so modules can implement hooks to provide the database information that needs to be gathered and written for their particular node/field types.
Possible advanced features include: keeping track of new nids so that links in pages can be updated, comparing nodes that share the same path to generate a complete revision history for the node, copying over required content types, interactive updates to deal with potential conflicts, etc.
But the most important feature has to be stability since the whole point of creating a dev site is to not break your live site. This module is not very useful if it breaks sites.
If this sounds like a project you would be interested in working on, giving feedback to, or sponsoring, please just respond to this thread. If this thread gets active we'll move the conversation to a project page. I'm posting this here so that everyone is local, giving us the option to meet in person.
Thanks,
Steven
Comments
You might want to check out
You might want to check out this module which is somsewhat similar to what you're proposing
http://drupal.org/project/migrator
While that module is focused on migration as opposed to import/export, the technological problems are exactly the same. Could be a good place for collaboration.
Great link. It also points
Great link. It also points to a couple more related projects to build off of,
http://drupal.org/project/importexportapi and http://drupal.org/project/node_import
Steven
Big problem
This is actually a big issue, and it's not limited to nodes -- e.g. CCK type definitions, exporting Views, variable settings, etc. etc.
So, limiting to nodes is, well, limiting. Although the larger issue is very tough to solve.
Those aren't really the itch
Those aren't really the itch that I need scratched, but I don't think adding views and cck types makes the problem significantly harder. views and content types already support importing and exporting, and you could filter views using mostly the same filters as for nodes (eg menus, paths, changed date, although uid's are missing, which would be a big deal for me). CCK types are trickier to filter for since you don't have a path, a menu, or a changed variable. The simple answer is migrate the CCK types that you need for the nodes that you are migrating, but in practice I can see this being insufficient most of the time.
But yeah, once you get beyond that the problem becomes very tough.
Though that makes me think, the other thing you could do is go the other way. Usually the only thing that is changing on a live site while I am modifying a dev site, are comments and new nodes. In that case the limited solution works by migrating those new live nodes/comments to the dev site then copying the dev database back to the live site. Is that true for others?