I have one web application with site collections. Then I have a subsite inside. I want to export this subsite (and only this one), and import it in a new web app I will create.

Question is : Is this possible ? I'm guessing, ofc, with powershell Import/Export-SPWeb. This seems easy. But When I will import it, will my subsite, becoming a entire site, will use a the new web app's database ? Because I want to separate its database.

If you have any advice :)



UPDATE1: The Export-SPWeb and Import-SPWeb exit with errors : HRESULT : 0x80070005 (E_ACCESSDENIED) on some files (like AllItems.aspx). But it creates documents libraries as I expected. But it does not create the home page, and the personnalization I did.

And the documents libraries it created returns a 404 not found when I try to open them...

I tried using -UseSqlSnapshot with my Export-SPWeb but it seems like my SQL version does not support this. But I don't think that this parameter would have change anything.

  • If I save my subsite as a template, and then create the new one with this template, maybe it will work. Just an idea, I'll try.
    – Nico
    Apr 22, 2014 at 7:46

2 Answers 2


Not an exact apples to apples comparison, but here it is......

I used the following link to backup and restore.


I used the powershell script under paragraph "Move Site Collection from Test to Prod".

Backup-SPSite http://sp-test.contoso.net/sites/research –Path E:\BackupServer\BackupShare\ResearchBackup.bak -UseSqlSnapshot

Restore-SPSite http://sp.contoso.net/sites/research –Path E:\BackupServer\BackupShare\ResearchBackup.bak

There is another paragraph (Renaming) that had it all in one script (I believe), but I elected to do it in two separate scripts.

Backup-SPSite http://sp.contoso.net/sites/HR –Path E:\Backup\HRBackup.bak -UseSqlSnapshot Restore-SPSite http://sp.contoso.net/sites/HumanResources -Path E:\Backup\HRBackup.bak Remove-SPSite http://sp.contoso.net/sites/HR –GradualDelete

I ran bolded Restore command in a separate script. It created a new Site Collection and put it into an open ContentDB.

Started the PS script with: Add-PSSnapin Microsoft.SharePoint.PowerShell.

  • Please add more details, your answer is to dependent on the link (if it breaks it will be of no help to future readers) Apr 18, 2014 at 15:43
  • Thanks for your answer. I use Export-SPWeb and Import-SPWeb. But the Export-SPWeb log show me lots of error while exporting pages (HRESULT : 0x80070005 (E_ACCESSDENIED)). And the Import-SPWeb tells me that it will work, only if the tree structure is exactly the same. Maybe the Backup-SPSite works properly. I will tset out things, and come back when it will be done. The Backup-SPSite works while the site is in use ? And this command created its own collection site ? Really ?
    – Nico
    Apr 22, 2014 at 6:55
  • The Backup-SPSite saves the whole collection site no ? If I just want to save one subsite, will it works ? EDIT : test it, and it does not work since I'm trying to save/move a subsite, not a site collection.
    – Nico
    Apr 22, 2014 at 7:00
  • Try using stsadm -o export -url http:\\your.site -filename e:\export.cab -includesecurity I was able to export a subsite in a Site Collection. I user stsadm -o import -url http:\\your.site -filename e:\export.cab -includesecurity to put it in another. It is time consuming. It would go through the export process before getting error feedback, but you could find out what they are. Apr 22, 2014 at 13:28

Question is : Is this possible ?

Yes. You can export-import subsites. Ensure that You have all same features activated in new site-collection (target site-collection)

But When I will import it, will my subsite, becoming a entire site, will use a the new web app's database ?

You cannot export-import site collections ('sites', as You say). But You can create another site-col and restore (import) subsite there.

Because I want to separate its database.

You can create site-collection in same WSS_Content database, or add separate database for this new site-collection (SharePoint puts new site-collections using its own order, but You can set first database to readonly and SharePoint will use new database. Use this article and google)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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