Huge CCK field export/import I am having troubles exporting and importing a large numbers of CCK fields using Content copy (I need to have a file download/upload option).

Is there a SQL (or drush) command that can export and import CCK fields? I am interested in anything that bypasses the PHP memory limitations, 504 gateway time-outs, and what not.

Maybe I could still use HTTP from the webserver's CLI, something like wget  &lt;export from content copy&gt; &gt;data.txt and wget --post-data data.txt &lt;import via content copy&gt;.
There's two ways to solve this...


Easy/tedious way, export only a few fields at a time using content copy and try to find out what's the max number of field you can select before running into php errors. This could be pretty cumbersome as you have a lot of field but this is the recommended/safe way.
Hard/dangerous way is messing up directly with MySQL. You need to be a little SQL savy to do this and rigorous to not forget anything.


So a little explanation for the n°2, the information your looking for is in these tables:


content_type_CONTENT_TYPE_NAME, this table store all non multi-valued fields of your CT (CT = Content Type).
content_field_FIELD_NAME, there's one of these tables for each of your field that is set to be multi-valued.


Internals CCK tables:


content_node_field_instance, stores definitions of each of your fields (label, weight, widget, name of CT...)
content_node_field additionals settings (required, multivalue, db storage...)
content_group_fields and content_group informations regarding the grouping feature.


So now you have the table, now comes the tricky part. 

If your CT and fields doesn't exists on the destination, it's quite easy, just export the tables of your CT and fields in SQL, export the content of the internal CCK tables using your CT and fields names.

If your CT or any of your fields (remember that fields can be shared between CT) exists on the destination you have to evaluate the changes and update the table structure to apply these changes, I think this easy pretty difficult to deal with so I wouldn't recommend you to do so.

Good Luck.