I had backed-up a site from one site collection and I wanted to restore it to another site collection.
First thing I had to do was to format the site collection with the same template. My backed-up site was STS#1, so I had to recreate my new site collection with STS#1 as it had been using STS#0. Fair enough. I understand it would be hard for a utility to deal with different templates.
After I restored using the following commands, I noticed the content did come over:
cls
Add-PSSnapin microsoft.sharepoint.powershell -ea SilentlyContinue
$path=”C:\temp\ocrs_071216_0833.bkup”
Import-SPWeb -identity “http://hcmsspd01/sites/OCRs” -Path $path -UpdateVersions OverWrite -Force
I got the structure for the lists and libraries–but no data. Also my Site Pages weren’t copied.
I Googled the command and didn’t find any caveats that I missed.
Any hints about how to get content with this?
I think you are copying site collection.
use this below commands to backup and restore Site collection. To run Restore command you don’t have to create a new site collection to overwrite it.
Backup-SPSite
Backup-SPSite http://server_name/sites/site_name -Path C:\Backup\site_name.bak
Restore-SPSite
Restore-SPSite http://hcmsspd01/sites/OCRs -Path C:\Backup\site_name.bak
Export-SPWeb -Identity “http://test/records/” -Path “D:\records.cmp” -IncludeUserSecurity
Import-SPWeb “http://test/sites/records” –Path “D:\records.cmp”
You can also try to Backup and Restore and when you are doing this also validate that there is no content in the root site collection as it will be overwritten:
Backup-SPSite http://servername>/sites/home -Path C:\Backups\home.bak
Restore-SPSite http://servername>>/ -Path C:\Backups\home.bak -Force
To get in more detailed about Site collection backup/restore vs. site export/import with focus on running workflows, version history and auditing, check this link
Back up, restore, or move a SharePoint site
Learn about how to prepare to back up and restore SharePoint 2013 and complete specific operations:
https://technet.microsoft.com/en-us/library/ee662536.aspx
Using Windows PowerShell to restore a site collection in SharePoint 2013:Â https://technet.microsoft.com/en-us/library/ee748655.aspx#proc1
You may also get help from this solution to move content from one site collection to another easily and efficiently.
Hope this helps!