SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top (Root site collection) (First sub site collection) (Second sub site collection)

I need command only to take backup and restore the root collection without ../subsiteA and ../subsiteB?

share|improve this question
Seems like this is the same question as answered here:… – Steve Lineberry Feb 25 '13 at 19:43

If you are using powershell, you can try:

To export use:

Export-SPWeb http://spsite/SiteA –Path "SiteAexport.cmp"

Then try to import

Import-SPWeb http://spsite/SiteA –Path SiteAexport.cmp –UpdateVersions Overwrite

In addition you can also use tool to import and export number of SharePoint contents like site collections in your case :)

share|improve this answer

You can use the Backup-SPSite cmdlet built into SharePoint 2010 and SharePoint 2013, which will only target an individual site collection. In the scenario you're describing, each of those site collections would need to have separate calls of Backup-SPSite in order for them each to be backed up. If you run the command below, it will only target the top-level site collection, which is what you're looking for:

Backup-SPSite -path 

If you were to want to do site collection backups for each of the site collections, you'd either need to populate an array of the site collections in the web application, or to name them each individually in calls to Backup-SPSite. By default the Backup-SPSite cmdlet will not iterate through each of the site collections beneath the root site colleciton if you pass it the URL for the root site collection.

NOTE: if you're using SharePoint 2007, you'll want to use the Backup operation for STSADM with the -URL parameter populated with the URL of the target site collection.


share|improve this answer
So, after taking the backup for only top-level sitecollection without subsites. Can I restore it back to one of the subsites in same site collection. For example: Could you please let me know the command to restore it or any other command to do it – 4uSharePoint Mar 6 '13 at 18:45
I think you're confusing site collections (the SPSite object in the SharePoint Object Model) with subsites (the SPWeb object in the OM). You cannot restore a site collection backup as a subsite because they're not the same type of container. You can restore it to a different site collection within a web application, by using a managed path ( instead of, but otherwise you'd have to treat it as a content migration and use the import/export tools instead of the backup/restore tools. – John Ferringer Mar 16 '13 at 13:15

/sites/subsiteA and /sites/subsiteB are two completely separate site collections from /, given that /sites/ is a managed path.

Backing up / using Backup-SPSite will therefore not also backup subsiteA and subsiteB.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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