3

If I was to use a backup of one site collection and restore it onto another, would this give me every single thing that was on that site collection. So sites, lists, workflows etc?

0

Yes. That is exactly what it is supposed to do. I do this on a normal basis to sync between production and test environments.

Here is the Powershell code I use to do this:

$dir = "\\backup\sharepoint\"
$sourceSiteCollection = "https://sharepoint.old"
$destinationSiteCollection = "https://sharepoint.new"

$backupFilePrefix = "sitecollection_"

#filter to look for latest backup file
$filter= $backupFilePrefix + "*.bak"

Backup-SPSite $sourceSiteCollection -Path ($dir + $backupFilePrefix + $(get-date -f MM-dd-yyyy_HH_mm)+ ".bak") -Force

#Retreive latest backup file from path
$latest = Get-ChildItem -Path $dir -Filter $filter | Sort-Object LastAccessTime -Descending | Select-Object -First 1

Restore-SPSite -Identity $destinationSiteCollection -Path ($latest.DirectoryName + "\" + $latest.Name) -Force -Confirm:$False

I backup to a network share that is reachable from both servers. This can also be used to move one site collection to another on the same server if you like, just adjust the source and destination paths.

Also you need to be careful, if you are using absolute urls in your site, because these won't change, and will still point to the content in the old Sitecollection.

Hope that helps.

For more information, look at Backup-SPSite

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.