0

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

0

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

6
  • thanks for reply but I want to test upgrade the Prod content database is any way backup this content database without its data and can it be mount to SP 2016? Feb 1 '21 at 7:13
  • You can write t-sql scripts to take backup of SQL DB without the data. However, MS doesn't support directly accessing SP content database. Feb 1 '21 at 13:33
  • i did this but when i mount it shows error in SP 2016 Server Database with name [WSS_Content_tesupgrade] is not a content database Feb 1 '21 at 13:51
  • Are you referring to a new site collection content database that you have created in SP2013 PROD and then took backup and trying to upgrade to SP2016 in TEST? Or are you referring to a content DB without list/library data? Feb 1 '21 at 13:57
  • 1
    I wouldn't recommend using this process to take SP content DB backup (objects only). You are going to run into all kinds of issues as SP Content DBs store other information which might have been removed. Feb 1 '21 at 14:16

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.