The most important thing to understand about Content Porter is that it is just a tool, it cannot perform wonders, it just automates what you can manually do yourself. With the added benefit that it should in most cases be faster than copying all items over manually.
The second most important thing to know about is what I like to call the "chicken and egg problem". Who was there first the chicken or the egg? Since you need a chicken to create an egg but a chicken comes from an egg... Content Porter cannot always determine in what order something needs to be created, which can lead to errors. A simple example:
- you create a Folder called
- you create a Schema in that folder called
- you assign the
bar Schema to be the mandatory Schema for the Folder
You needed 3 steps to create this setup, which consists of 2 items. When Content Porter has to import the
bar Schema, it will need to create the
foo Folder first, but to do that, it needs to have the
bar Schema there already. A chicken and egg problem...
Then pointing back a bit to the first thing I mentioned: invalid content can NEVER be imported, period. So what is invalid content, well consider this:
- you create a Schema named
foo with 1 field
- you create a Component named
bar based on Schema
- you change the Schema
foo and add a mandatory field
Now when editing the Schema
foo in step 3, you were issued a warning, that any changes you made to the Schema might invalidate content, and you had to fix those issues manually. If you didn't do that, then the content of Component
bar is invalid. Content Porter will NEVER be able to import the Component
bar unless you fix its invalid content (by supplying a value for the mandatory field) before exporting the
So on to your question, how to perform an error free content port? First of all make sure you don't have "chicken and egg" problems (a proper Folder structure should already prevent that), and synchronize your Components against their Schemas (making sure all content is valid).
Then you should consider exporting and importing in logical steps. Make a plan to first import the structure you need, like Folders and Structure Groups. Then import all Schemas (be careful there, if your Schemas have changed, then that step might invalidate content on the new environment already). And then import all Templates and last import content like Components and Pages.
Most important here is to make a clear planning, similar to as you would when you wanted to to it manually. With correct planning and good understanding of what you intend to do, your imports can be error free.
Last remark on your suggested approach: Content Porter uses WebDAV URLs to map links, so you should always keep the structure on your two servers similar, or Content Porter will create new items instead of updating existing ones, which might duplicate content and mess up your entire structure (Pages with old Components on there or new ones or a mix of both). Porting content is not something you can do without disturbing the current users. In my personal opinion I would even never import stuff when there are users working on the system, as they might have a lock on something which Content Porter needs to update, and you get the point, there you have another error scenario again...