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