Monday, November 05, 2007

SharePoint Content and Customisation migration between environments - The Problem

I often get asked how can I "easily" migrate all of my site customisations (Site definitions, features etc) and any content between environments. This means moving changed content from Development to Staging and ultimately to Production.

Here is a diagram of the scenario:

The problem

Problem 1:

Each environment will operate in its own domain/security boundary and each site collection will have its own credentials and there are firewall restrictions between each of these environments. Also how can we move the changed content between these environments?

Problem 2:

On top of this one has to consider the implications of migrating only the changes made since the last deployment. Performing a backup and restore of sites isn't ideal as you will surely overwrite content that is already in place. You only want to deploy the deltas not everything.

Problem 3:

Can we rollback changes in staging or production of something goes wrong?

I might have found a solution to Problem 2, Enter the "WSS 3.0 - Content Deployment and Migration API".

According to Stefan Goßner you can use the WSS3 content deployment and migration API to do the following:

  • export an entire site collection

  • export a specific site inside a site collection including or excluding content in subsites

  • export a list or document libraries or even of a folder inside a document library

  • export a single list items or documents from a document library

  • export dependent objects (like images referenced by a page) by following links

  • generate as a compressed export file or in uncompressed format

  • allow export with a define a maximum size for the generated compressed file (multiple export files will be created if required)

  • allow incremental export of items based on a given change token. This will export all items that have been created, changed or deleted after the timestamp in the change token.

  • import the exported content with or without identity preservation (means items will keep their GUID or not)

  • import the exported content under the same or a different parent in the destination database

  • do link fixup during import

This solves one piece of the puzzle but also raises a few more questions....

Q1: You have to cut some code and piece together various code snippets from MSDN and the like. Are there any free tools to handle this without having to write code? Answer. Not that I can find.

(You can almost hear the gears turning in my head planning something :-) )

Q2: Can you rollback to a previous version if there is an issue with the imported content? Answer. It appears not. So backup before you do anything.

Q3: Can I simply migrate everything the first time around and only deploy the deltas on every subsequent update? Answer. According to the API documentation you can based on a timestamp.

So for now we are stuck with a tricky way to migrate content using a hybrid of solution deployment, backup/restore and installing and activating features all manually. But rest assured I am in the process of working out a way to get around this. So feel free to shoot me an email offering your comments and thoughts.

I did find one tool that can solve the problem but it isnt free. check out: http://www.avepoint.com/products/sharepoint-content-management

0 comments: