Moving Site Collection to Different Web Application – SharePoint

We created a site collection for saving CRM documents on Intranet web application, we wanted to move that site collection to a new web application to avoid having a single point of failure for the 2 site collections and also allow the CRM administrators to control the maximum attachment size for files stored on SharePoint.

We achieved this by running the below 2 PowerShell cmdlets:

Backup-SPSite -Identity “http://intranet.domain.com/sites/CRMDocs” -Path “C:\CRMDocumentsSiteCollection.bak”

Restore-SPSite -Identity “http://intranet.domain.com:8888/sites/CRMDocs” -Path “C:\CRMDocumentsSiteCollection.bak”

The site collection will be created if not already existing, and if we want to override an already existing site collection on the specified URL then we will need to add the -force parameter.

Then we re-configured the documents management settings in CRM to point to the new site collection URL, the good thing about CRM is that it saves the document locations relatively, so such a change in the base URL only requires updating the SharePoint site URL and everything works fine.

Please note that in case you faced a SQL timeout while re-configuring the document management settings in CRM due to having large number of documents then you will need to increase the CRM SQL timeouts on the front end servers.