Import/Export operation of a particular SharePoint site using Power Shell

The easiest way to copy SharePoint sites cross domain is to export the site using PowerShell and Import it into destination SharePoint using another PowerShell script. There are couple of things we have to keep in mind though:
 
1. It's better to import into a brand new site
2. Install all associated features/web parts even before running the PowerShell script, otherwise the import will fail
3. Recreate the permissions and security layers after succesful import
4. Fix all the absolute Links URL referenced inside the application
5. Rebuild calendar Overlays (If existed)
6. Fix BCS (Business Connectivity Services) based External Content Types and re-create or re-point them to appropriate data sources
7. Fix Alerts
8. Re-visit workflows and event-handlers and Re-Install if needed. because, workflows are not portable
9. Fix all the broken Client scripts (Java-Script or JQuery)
 
Now let's see how to export and import from SharePoint "A" site to SharePoint "B" site.
 
1. Run the following powershell command in SharePoint "A" site
 
Export-SPWeb -Identity http:\\ServerName:port\Site -Path c:\\backup\TeamSiteBack.dat
 
2. Run the following powershell command in SharePoint "B" site
 
Import-SPWeb -Identity http:\\ServerName:port\Site -Path c:\\backup\TeamSiteBack.dat -Force

Comments

Popular posts from this blog

Cloud Computing Technology Assessment

Database Testing With DBUnit

Data Science, Big Data & Microsoft Machine Learning