8

I am trying to port content from one environment to another: Dev to Stage for example.

I am using SDL Tridion 2011 SP1. I am using SDL Content porter 2009 SP1.

The content sync has not been done from long time. Earlier both these environments were in sync and now there are major differences between both environments. The blue printing has not changed.

I am thinking of using one of the following options to do the porting. As so many users are using the Stage environment, I do not want to disturb their work:

  1. Import all data from Dev to stage as altogether new.

    1. Import all Components into a new folder without disturbing the current Components
    2. Once all Components are imported, replace the old Components with the new Components
    3. Follow the same process for Templates and Pages.

    Query: With this process, I am importing all the pages in the end. With this process, will these pages still map to the new components? I am not sure if they will because I will have duplicates of each component but situated in different folders.

  2. Import all pages directly

    Query: Not sure which errors might come up with this approach. I doubt if it can affect the Stage environment. Is this viable?

If the above strategies are not correct, please suggest a good strategy to perform error free porting.

Thanks in Advance.

0

3 Answers 3

8

In this situation, I generally recommend (do read the disclaimer ;) ) the following as a release / content refresh cycle:

  1. Ensure that the BluePrints really are the same in terms of inheritance and Publication Titles;

  2. Content Port system items from Dev to Stage from the top of the BluePrint down in separate Content Porter packages in the following order:

    1. Multimedia Types
    2. Schemas
    3. TBBs
    4. Templates.

    Take care to not take the Content, Security, Default Items and Workflow by setting the proper Dependency Filters. Do take the folder / SG structure where necessary. If security settings are different, you'll have to synchronize these as well.

  3. Take a Backup of your Dev environment Tridion CM database.

  4. Did I mention to take a backup of your Dev Tridion CM database?
  5. Only when this is all in Synch, take a backup of the Stage Tridion CM DB and restore that to the Dev environment. When that has gone successfully, you'll have to take a couple of steps to ensure proper functioning of the restored database:
    1. Check the QUEUE_CONSUMERS table in the Tridion CM database and set all hosts which are not related to the Dev Environment to 0;
    2. Turn off all Publish Targets for staging (!);
    3. Set the right Publish Targets for the Dev environment;
    4. Start up the Tridion CM to see whether everything still works ok.
    5. Ensure your security settings are still correct

Once all this is done (it seems like a lot, but in reality it isnt), you have synchronized your templates to Stage and you have an updated content base on your Dev environment.

From your post it seems that Tridion Schemas may have changed a lot as well on Dev. Ensure that prior to restoring the database, your components are in full synch with your imported schemas, or else you and your content editors may be missing out content!

Once you're comfortable to using this mechanism, you'll find its the easiest way to synchronise content between environments.

However, the usual disclaimer applies: do this at your own risk and do ensure that this way is really possible for you: among others, you need to have the same top-level BluePrint and you can't have not easy to change data, like hardcoded TCM IDs which are different per environment, or other specific data or items which are only present and valid for one environment, in your Dev environment.

5

Unfortunately, in your scenario (where for long time no sync has been done), in my experience I have never seen a error free porting with Content Porter unless you have kept all the details of changes in individual building blocks.

For you first query - How are you planning to export/import components/pages/templates in a new folder? Per my knowledge, CP will take webdav url in consideration and will import in the same hierarchy in which you will export.

If you choose to change the hierarchy of components on Dev (For those which may be conflicting with the one available on the Stage Environment), in that case it might work provided you have not missed a reference while exporting them (and many other such considerations).

If you import all pages directly there is a very high probability that you get plenty of errors and specifically if you pages are localized, then per my experience, it will fail with high probability.

What I can suggest -

You export/import the schema, templates (CT, PT, DWT) through content porter as these should get ported without much issue (or no issue with few bug fixing in the dev environment)

For Components/Pages you rely on manual content entry - as a workaround you can export all components and pages and import using Content Porter with Transaction Rollback mode off. This will let you import whatever possible items in the environment and give a list of all failed items - for those you may choose for either manual content entry or may opt for individual bug fixings.

5

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:

  1. you create a Folder called foo
  2. you create a Schema in that folder called bar
  3. you assign the bar Schema to be the mandatory Schema for the Folder foo

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:

  1. you create a Schema named foo with 1 field
  2. you create a Component named bar based on Schema foo
  3. 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 bar Component.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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