Migrating SharePoint Sites

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

Published Tuesday, October 5, 2004 3:45 AM by Bil Simser
Filed under:

Comments

# re: Migrating SharePoint Sites

Tuesday, October 19, 2004 4:42 AM by Marc Free
Thanks for posting this succint summary.

A simple 'run smigrate like this' to backup and 'like this' to restore has saved hours of reading documentation on all the (no doubt extensive) features of this command.

# re: Migrating SharePoint Sites

Thursday, June 22, 2006 11:34 PM by Help
Hi,

has anyone out there migrated an information website to a sharepoint portal? any ideas how to go about doing that?

# re: Migrating SharePoint Sites

Wednesday, July 26, 2006 3:32 AM by Stephen Maij
Hi Bil, I'm wondering if you can help me find out how to add WebParts programmaticly, c.q. change the teamsites that are already deployed by scripting. I hope you can help me further on that.. With Regards, Stephen

# re: Migrating SharePoint Sites

Friday, August 4, 2006 10:26 AM by jasmin goldstein
i used to do it with scripts but became very time consuming, so heres a useful tool www.webfox.ca called backup elite sc v4 to move sites, sub sites and keep user permissions with a gui interface cheers, jasmin

# re: Migrating SharePoint Sites

Tuesday, August 22, 2006 8:21 AM by Brian V
Good tips, should save a bunch of time.

# re: Migrating SharePoint Sites

Monday, September 27, 2010 11:48 AM by amar

Hi Guys,

I have a strange requirement, I have to move sharepoint (MOSS 2007) publishing site with all custom coded pages to asp.net website. Is this possible, if yes how and is there any article for this? Please help