DCSIMG
How To: Move a single Site between Site Collections - Remember Sammy Jankis

How To: Move a single Site between Site Collections

Hey,

I'm hearing a lot of this question in many variations and I figured it's time to solve it once and for all. The problem is well known: trying to move a WSS Site between 2 different places (such as Site Collections) is still not something we're doing with a click of a button. There is no real and easy of doing so and I've heard about many "nasty" solutions (such as Backup/Restore for entire Site Collection, Copy-Pasting everything with the Explorer View and many other messy evils).

It looks like multiple teams in Microsoft have been tasked with this issue since we actually got 3 different ways to solve it:

  • SharePoint Designer Backup/Restore - Definitely the easiest way to move sites around but only WHEN IT WORKS (since that's not a very consistent feature in SPD). To use this method, simply go to Menu --> Site --> Administration --> Backup Web Site and enter the URL of the WSS site you want to move. You can also include/exclude other subsites in the archive you're creating. Restoring it to the new Site Collection is done with the Restore Web Site feature in SPD. Again, remember this is not too consistent so always try to restore before deleting an original site (Even when you get the "Backup Operation was completed successfully" message!). 
  • Stsadm.exe export/import - The stsadm.exe admin utility is not a new tool but in the 2007 it has many improvements. Now, we can use stsadm as a way to import and export single sites. By the way, this is actually how Share Point Designer creates the archive in the mentioned SPD method. Don't get confused with the backup/restore operations in stsadm.exe - those operations were already available in 2003 but they are used for entire Site Collections rather than a single site (and in our case it's a major overkill). Sounds great huh? Well, just like the SharePoint Designer way, it could easily become a MAJOR NIGHTMARE when it's not working so let me give you some tips. I hope this will reduce the amount of time spent CURSING THE HELL of our beloved stsadm's command line window and the its log file.
  1. The default cabsize value is 25 Mb which is VERY lame for big sites! Always define ur own cabsize (up to 1 GB...)
  2. It is highly recommended to add the “-haltonwarning” or “-haltonfatalerror” parameters. You'll be able to see a list of possible problems before proceeding with the creating on the archive.
  3. If still encounter failures and you don't understand WTF that could be, You might want to try the –nofilecompression switch. Somehow, exports tend to fail in much bigger numbers when you try to compress them.

And to sum it all up, here's the complete command with all of the available switches for exporting/importing with stsadm.exe:

stsadm -o export -url <URL to be exported> -filename <export file name> [-overwrite] [-includeusersecurity] [-haltonwarning] [-haltonfatalerror] [-nologfile] [-versions <1-4> 1= Last major version for files and list items (default), 2= The current version, either the last major or the last minor, 3= Last major and last minor version for files and list items, 4= All versions for files and list items] [-cabsize <integer from 1-1024 megabytes> (default: 25)] [-nofilecompression] [-quiet]

stsadm -o import -url <URL to import to> -filename <import file name> [-includeusersecurity] [-haltonwarning] [-haltonfatalerror] [-nologfile] [-updateversions <1-3> 1= Add new versions to the current file (default), 2= Overwrite the file and all its versions (delete then insert),3= Ignore the file if it exists on the destination] [-nofilecompression] [-quiet]

  • Content Deplyoment - Ok, now we're really talking! Let the real fun begin! This is probably the coolest and by far the most elegant way for synchronizing content between Site Collections. Although this is for a Site Collection level - it's a great way to make a lasting connection and keep moving new content between environments. Before using this method, you need to be familiar with two core conceptual objects: Paths and Jobs. A Path is set of definitions that represents a connection between the source environment and the destination environment. The path contains information about which source web application and site collection you are deploying, authentication information for the destination environment, and the web application and site collection on the destination MOSS. However, a path by itself doesn’t actually deploy any content - it's only a set of definitions. In order to sync the environment, you must create a Job. Each job is associated with a path, and determines exactly which sites in the source site collection will be deployed and on what schedule.

Now the really cool thing about this method: It uses the same logic and internal audit/log files as the Index jobs. That means that you can define a job that only deploys the changes since the last successful deployment and this could for a single item/document level. Great for saving bandwidth and time. Furthermore, if there are no changes since the previous job, the deployment will complete without redoing any unnecessary work. Of course, full deployments every time can be configured if that’s what you really want but this is not necessary in most cases.

    Awesome hug? Although this is for Site Collection level, I think it addresses the main scenario that is main reason for wanting to move a list or a whole site between places: Replication between the Testing environment to the real Production environment. Using this method, you can define it once and deploy testing versions whenever you think you're done playing and it's time to publish your changes. You can find the Content Deployment management interface under the SharePoint Central Administration site. One aspect of content deployment that you should be aware of is that it will only deploy content, not any dependent assemblies/controls/webparts, etc.  Administrator is responsible for moving the assemblies for controls and webparts to the destination farm.

In conclusion - We're dealing here with 2 types of scenarios: If we're talking about moving an entire site ONCE between Site Collections - the SPD and stsadm.exe ways are preferred and you should just use them. If you're talking about synchronization between two environments and it's something that should happen every once in a while - we'll need that lasting connection that is provided through Content Deplyoment.

' Till next time,

Adir Ron.

Published Monday, April 16, 2007 10:46 PM by Adir Ron

Comments

Thursday, March 13, 2008 10:45 AM by Naresh

# re: How To: Move a single Site between Site Collections

Hi,

I had a big issue to do.........

Actually I have 2 MOSS servers(separate Installations), one is at Bharain and one is at Saudi, both are on 2 different domains. Now what we need is when I uploaded some content in Bharain server, after some time Saudi server also wanted to be updated automatically(Using Synchronization).

I am trying with central administration features as following:

Central Administration-->Operations-->Content Deployment-->Content Deployment Paths and Jobs

But I am getting the following 2 error's:

1)Export ran out of memory while compressing a very large file. To successfully export, turn compression off by specifying the -nofilecompression parameter. at Microsoft.SharePoint.Deployment.ExportDataFileManager.<>c__DisplayClass2.<Compress>b__0() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.Deployment.ExportDataFileManager.Compress(SPRequest request) at Microsoft.SharePoint.Deployment.SPExport.Run()

2)Content deployment job 'Home Deploy' failed.The exception thrown was 'Microsoft.SharePoint.SPException' : 'Export ran out of memory while compressing a very large file. To successfully export, turn compression off by specifying the -nofilecompression parameter.'

What might be the problem and how to resolve it? It's very important and need to resolve as soon as possible, please concern with high priority and do needful Thank you........

Please revert back to me on naren378@gmail.com

Thursday, May 15, 2008 1:19 PM by Sam

# re: How To: Move a single Site between Site Collections

This could be very helpful for me, thanks very much. My specific problem is that we are migrating from WSS 3.0 to MOSS 2007, both are on different servers and I want to export the existing content to the new MOSS site. Can I still do this using this stsadm method you have shown even though they are in different web applications and on different servers?

If how how would I go about that? I am trying to do it with SharePoint designer but it keeps hanging at the "Creating Backup Files" stage.

Wednesday, May 21, 2008 9:46 PM by Florin Muntean

# re: How To: Move a single Site between Site Collections

Hi,

There is a problem when moving sites from one site collection to another because of the hiden user list that can differ from one site to another.

Read more here: fmuntean.wordpress.com/.../assigned-to-name-changes-when-moving-list-from-one-site-collection-to-another

Have you got anything that go around this issue?

Thanks,

Florin

Wednesday, October 29, 2008 4:09 PM by scott

# re: How To: Move a single Site between Site Collections

Brilliant! Why this isn't documented better is a mystery. Thank you for your due diligence and willingness to share your knowledge.

Thursday, November 13, 2008 9:04 PM by andrei

# re: How To: Move a single Site between Site Collections

Hi , thanks for the article . I did export , but when tried import - got this -->

FatalError: Could not find WebTemplate PWS#6215 with LCID 1033.

Wednesday, January 28, 2009 8:31 AM by Through the Filter 01/28/2009 | WebedtecH

# Through the Filter 01/28/2009 | WebedtecH

Pingback from  Through the Filter 01/28/2009 | WebedtecH

# Move a single Site between Site Collection &laquo; Derhackler&#8217;s Blog

Pingback from  Move a single Site between Site Collection &laquo; Derhackler&#8217;s Blog

Tuesday, June 30, 2009 12:03 PM by nick_eltrpa

# re: How To: Move a single Site between Site Collections

varvic4tdart.com/trchitrocc.html domsitcnaa

<a href="nodaralcnali.com/.../a>

[link=ermonzelzelr.com/vibocletocar.html]domsitcnaa[/link]

[url=vibotaol.com/trletol.html]domsitcnaa[/url]

bastrocroldeltr.com/racctroc.htm letosi eltrocp

<a herf=coraccacelvartr.com/.../a>

monvaraleltroll.com/ortrocmonl.htm c4toloboe racrelb

<a herf=chiorletochirac.com/.../a>

alpasaldelvarc4.com/monacdom.htm sitdel acmonrol

<a herf=zeltaricbasacel.com/.../a>

calalacodelrold.com/trocdombocou.htm zellasitbo raccaac

<a herf=racreltrdronbov.com/.../a>

paserracroacchi.com/pastad.htm sitacel dronac

<a herf=chirooloroldeld.com/.../a>

trocololetorolo.com/licvit.htm delercaroc trraca

<a herf=rotadrontrdelda.com/.../a>

zelzelelrelrelt.com/acrobas.htm elcoda ricerle

<a herf=roc4tdrongetcol.com/.../a>

domrolbocrolric.com/eltliacelr.htm zellivi roliracbasro

<a herf=eltchililaoubas.com/.../a>

eltcabolatreltg.com/rololomon.htm monvidome rolirelchi

<a herf=moncaoloerdarre.com/.../a>

latrcodelcococh.com/sitgetsit.htm lielc4te rictrocel

<a herf=reldronractadom.com/.../a>

elttroccolidron.com/acdomtrocdro.htm drongetctrc vialtrocdelt

<a herf=elttrocgetricge.com/.../a>

ororlidrondomcb.com/sitzelda.htm roolodomora taletolibas

<a herf=talasitgetdelpa.com/.../a>

cacelmonrolrold.com/dellibocelt.htm cnaboc eltconotro

<a herf=acelcodomouerel.com/.../a>

c4troc4tclicdel.com/viorpass.htm relbasb darrelcbo

<a herf=erc4tviacalerri.com/.../a>

rellacatazellit.com/tazelnovar.htm taliacorcoc lidelacviac

<a herf=racouvarlabocde.com/.../a>

mongetorctrviel.com/eldoml.htm alricrola algetrac

<a herf=creldroncnaracc.com/.../a>

chitroclaelgets.com/linopasel.htm oloace pastaleto

<a herf=sitdronacbasalc.com/.../a>

darcalieltacels.com/robasr.htm ermonsi orchiou

<a herf=livitroccnanopa.com/.../a>

oudronricacelac.com/cnaorac.htm dronpasbosit basacorleto

<a herf=orlialouacnooue.com/.../a>

sitnoactatrlaze.com/cnacodelsit.htm trtrocc4 ellitroccb

<a herf=olovieltricouro.com/.../a>

letorelcnavirac.com/chiricerb.htm darbaso elleto

<a herf=sittrdrontaricc.com/.../a>

trmonsitvarrold.com/almonctanot.htm chidar pasdom

<a herf=videlacricletod.com/.../a>

rollagetboctroc.com/sitletonoerr.htm virelelttro relraclet

<a herf=drongetgetpasre.com/.../a>

eltdelrelcnaelt.com/elcdel.htm alletoo domnoellidr

<a herf=pasoucabocmonvi.com/.../a>

racdeldomsitcta.com/relrelre.htm dombocbo cocnaroldom

<a herf=aceltzelouolosi.com/.../a>

varraclidomolor.com/trocsitle.htm elpase racvar

<a herf=cnaracracoloorc.com/.../a>

rolconoeltrosit.com/getracze.htm tadarvio rotaror

<a herf=elcnaoudelpasze.com/.../a>

varlabaselelall.com/getrolcl.htm racvarre vicaricv

<a herf=boclidarricpasc.com/.../a>

paselchicodelbo.com/bocreloutroc.htm taoloco dronoloa

<a herf=sitlagetvic4tmo.com/.../a>

darcorpaselbocm.com/rollicnaacl.htm riccgetli boczelczeltr

<a herf=dronorololichie.com/.../a>

larelvargeteltd.com/cnac4tdelde.htm relricmo vardarleto

<a herf=codarlaourobasg.com/.../a>

chiacliormontro.com/domcaletodr.htm acelri relmon

<a herf=c4tpasdarcarole.com/.../a>

roleltoueltleto.com/pascerr.htm dronricgetm chiouero

<a herf=caaldarnoelzelv.com/.../a>

noalvarcrelpast.com/ereltdro.htm cotroc paserrel

<a herf=alc4tactaaccbov.com/.../a>

pasracchivieral.com/elnolatr.htm cricrac bocvicala

<a herf=libasliorcodard.com/.../a>

outrocdomcalize.com/eltpas.htm notroc ccapasg

<a herf=acelouroc4ttatr.com/.../a>

baschivarorrolm.com/elorboc.htm chidardar virical

<a herf=deldomviracbori.com/.../a>

ricrocamondelmo.com/chierr.htm zelaln elalchido

<a herf=cac4tletorelnor.com/.../a>

cletoligeterdel.com/siterleto.htm acelvarlal getliligeto

<a herf=actrocrololosit.com/.../a>

http://vierlieltvarlet.c

c4telbobas

Friday, November 06, 2009 2:24 AM by lypesenonen

# re: How To: Move a single Site between Site Collections

Hi all wanted to introduce myself!! I look forward to being part of this comunity.

Tuesday, January 12, 2010 4:54 PM by Martina

# re: How To: Move a single Site between Site Collections

Thanks for the article, the copy worked fine for me with Stsadm.exe export/import

Monday, February 15, 2010 7:45 PM by Larry W. Virden

# re: How To: Move a single Site between Site Collections

One of the issues that has come up for us is that we are exporting from machine A, then importing on machine B. However, the pages imported, which were created and/or modified in SharePoint Designer, no longer work once imported. The issue appears to be that the pages reference web parts, lists, etc. having GUIDs which do not exist on machine B.

While developers could certainly go searching for the dozens - sometimes even hundreds - of GUIDs, attempt to figure out what the correspodning GUID is on machine B, then replace, the amount of work that would entail is staggering.

Surely there must be an easier way so the pages imported on machine B reference the new GUIDs. Is there a flag that handles this sort of thing?

Tuesday, November 02, 2010 12:48 PM by Ganesh Bairagi

# re: How To: Move a single Site between Site Collections

hi

i have one problem that i am going to migrate one site from moss2007 to sharepoint 2010 & i want not to migrate some contents from existing site i want to migrate it later (how to archieve contents while migrating) plese give me the solution & if possible send the solution to my email id ganesh_bairagi@syntelinc.com

Thursday, December 16, 2010 7:12 PM by Carlos

# re: How To: Move a single Site between Site Collections

Could the content deployment work to synchronize content between two site collections in the same web app?

We would like to have a central site collection that would share content between several other site collections of the same web app. We would like to change the content once, then it replicates to all other places.

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: