There is the following WSS solution deployment scenario:

  1. Copy the whole production WSS to staging
  2. Deploy new solution/update to staging
  3. Run automated tests & human tests on staging
  4. Deploy new solution/update to production

Now I wonder how to achieve point 1. Copy the whole production WSS to staging.

Is it possible to simply run stsadm -o backup/restore to copy to whole production to staging? Or are there better approaches for this?

Additional information:

  • Content DB < 500mb
  • Production/Staging environments share the same network & same AD
  • I am not looking for a commercial wss sync tool

There are a couple of options here:

  1. Use STSADM -o backup/restore
  2. Use STSADM -o export/import
  3. Use Content Deployment, perhaps with the SharePoint Content Deployment Wizard (a tool I wrote)

When you use backup/restore, you get everything - including recycle bin content, running workflows, alerts etc etc. This may or may not be what you want. Such 'environment-specific' things are not captured in 2 and 3 - the principle difference between 2 and 3 is that you can specify you wish all the objects (e.g. lists) to keep the same IDs. This can be important in some scenarios. An article I wrote some time ago, STSADM export, Content Deployment, Content Migration API, Features/Solutions - deployment options compared might provide you with some additional info on some of the options.

One thing I can't emphasise enough, is that if you've made any customizations in the file system (e.g. in the 12 hive/SharePoint root), none of these options will capture those (they all only deal with database content). Such customizations are typically deployed in Solution packages (.wsp files), meaning you effectively combine a couple of mechanisms to get everything to other environments.

  • Thanks for the great article. I do have some wsp solutions that place new files into the 12 hive. So basically I have to manually move these files even after doing a backup/restore? – driAn Feb 18 '10 at 8:06
  • How does stsadm handle the difference in URL (e.g. production is portal.company.com and staging is stagedportal.company.com)? – Web User Aug 2 '12 at 21:34

The best option for me is usually stsadm backup and restore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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