Question

Hi in SharePoint 2013 Can it possible to take backup of Content Database without data i mean no documents should come from all document libraries and list items from lists?

Here I can not take full backup from Production to test and I will restore this content database in Testing Environment for Test upgrade to SP 2016

Was it helpful?

Solution

In this case (where data can't be copied from PROD to TEST), I would create a brand new site collection with its own content database in SharePoint 2013 PROD environment. Create new test libraries and lists and populate them with TEST items and documents, possibly similar contents as in the actual prod site collection. And then take full database backup of this content database and restore it in the TEST environment to upgrade to SharePoint 2016.

Here is a sample PowerShell script showing how to create a Site Collection with its own content database.

Add-PSSnapin Microsoft.SharePoint.PowerShell

$webAppUrl = "https://sharePoint2013.contoso.com" 
$siteUrl = "https://sharePoint2013.contoso.com/sites/TestSiteColl" 
$contentDbName = "WSS_Content_TESTSite"
$siteName = "Test 2013 Site Collection"
$contentOwnerAccount = "domain\OwnerAccount"

$contentDb = Get-SPContentDatabase -Identity $contentDbName -ErrorAction Continue

if($contentDb -eq $null)
{
    $contentDb = New-SPContentDatabase -Name $contentDbName -WebApplication $webAppUrl -MaxSiteCount 1 -WarningSiteCount 0
}

$site = New-SPSite -Url $siteUrl -Name $siteName -ContentDatabase $contentDb -Template "OFFILE#1" -OwnerAlias $contentOwnerAccount

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top