Migrating sites from dev -> acceptance -> prod

One thing that comes up quite often is "How do I keep all the work I've done in development and move it to acceptance/production" with SharePoint? Luckily there's a nice command line tool that's bundled with SharePoint to do this.

SMIGRATE is a tool that can restore sites and move them from SharePoint Team Services (STS) into the new 2003 versions. It can also help you migrate sites from one server to another (or to the same server) in 2003 directly. This blog talks about using it for migration from a development environment to your production one (or test if you prefer).

SMIGRATE works wonders because a) it migrates all your data, including security and subsites b) you can execute it from any SharePoint server and restore to any server (you have to be SPS/WSS admin on both) c) is simple for moving all your hard work in development into acceptance or production. Using SMIGRATE is pretty straight forward.

To backup a website:

  1. Enter the following at the command line:
    smigrate -w http://server[/site] -f filename.fwp -u domain\id -pw *
  2. This will prompt you for your NT password. Enter it at the prompt.
  3. Grab a coffee and wait.

To restore a site:

  1. Create a new site through the portal site creation wizard. Note what the site url is.
  2. When you get to the point of applying a template, stop and close the browser.
  3. Enter the following at the command line from any SharePoint server (where siteurl is the url you used in step #1):
    smigrate -r -w siteurl -f filename.fwp -u domain\id -pw *
  4. Enter your password, grab a coffee, go for lunch or have a siesta.

There are a couple of gotchas you should be aware of.

  1. When you migrate a site, the new site has to exist. If you've gone through the trouble of creating the site using something like the SPS site creation wizard you'll find you get the site created then try to migrate and it tells you a template has already been applied. The trick is that when you to the screen in SPS where you apply the template to the site, the site is already created. Go ahead and start your migration now and when you're done, the site will be there and ready to use.
  2. Make sure all your dataview web parts and 3rd party components are on the target server. There's nothing like migrating the site then trying to access it, only to find yourself staring at the maintenance page trying to remove invalid web parts. This is especially true of dataview web parts as they are sometimes picky about the pathing to the datasource, especially if you have it pointing at another list on the same site.

In any case, the tool is a good friend to have so get used to it, try it out and make sure you understand what's going on before you start moving gigabytes of documents and lists onto your production boxes. There's also a good writeup on using the tool here and the online version of the Windows SharePoint Administrators Guide here.

For those that are afflicticted with GUI-Itis and fear the command line, there's a graphical interface that Renauld Comte created. You can download the file directly from here (note, you still have to run this on your SharePoint server).

1 Comment

  • While creating site in SharePoint Portal 2003 there appears no screen for selecting template. So after creating site when I execute restore command its shows me error " template has already been applied".



    If i m trying to create site through command prompt (as we do in Windows SharePoint Services) I am not able to execute createsite command...Please help me out....



    I need to migrate my whole stuff from production server to development server..



    Thanks in advance



    Vipul Patel

    Email - vipul.p@lntinfotech.com

Comments have been disabled for this content.