I have to clone a web application on a same server farm. What I've done so far: Backup the SQL DB of my webapp. Restored it under a different name. Create a new webapp and attach my restored DB.

What I face:

  • If I attach my new db, it shows # of site collections : 0.

  • If I remove the original db from its web app, then the copy will display the correct amount of site collections.

  • And vice versa.

It seems that I can't make coexist a copy from a web app on one SharePoint Farm. Note I've mounted the copy with the following command line :

Mount-SPContentDatabase WSS_Content_NewDB -WebApplication http://newWebAppUrl -AssignNewDatabaseId

Any advice ?

Many thanks in advance,


1 Answer 1


Yes, it is painful event with new DB id still not able to get the sites. There are various GUID involve int, even though you change the GUID of the Content DB but Site collection GUID are same.

In order to copy all site collections over there, i would do the following way ( which is 100% worked in all scenario).

  • Use Backup-SpSite to take the backup of site collections.
  • Create a new content database in new webapplication
  • Use Restore-SPSite to restore it new web application.
  • Indeed, I thought about this solution, however the size of the webapp (35Go) makes me nervous to perform this operation. The good thing is that I'm performing this on a lab farm, so I will give it a try anyway.
    – Jan
    Commented Feb 13, 2017 at 16:44
  • Ok, did it your way, even if the size was quite big. It performed well and I do I have a copy of my web app. Many thanks for your guidance !
    – Jan
    Commented Feb 14, 2017 at 8:57

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.