Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
1 like 0 dislike
1.2k views
in SharePoint Server by 66 69 85

In SharePoint 2019, I have two environments, I want to restore content database that already exists on the production farm to the staging farm without deleteting the current site collection database How should the site collection be migrated to the newly restored database in Sharepoint 2019?

  • The current content database name is: WSS_Content_V1, and the resored name is : WSS_Content_V2.

1 Answer

1 like 0 dislike
by 66 69 85
 
Best answer

How to restore SharePoint Content Database in SharePoint 2019?

You may restore the database without any problems by performing the below steps:

Prerequisites:

After taking the backup follow the instructions below:

  1. Restore the database on SQL Server.
  2. Get the list of all site collections that is stored on content database. We will use the results of this command to verify the resorting:

    Get-SPContentDatabase | where {$_.Name -eq "WSS_Content_V1" } | select Sites | Format-List

  3. Run Dismount-SPContentDatabase command with database name:

    Dismount-SPContentDatabase WSS_Content_V1

  4. Run Mount-SPContentDatabase command with the restored database and the WebApplication name:
    Mount-SPContentDatabase WSS_Content_V2 -WebApplication {siteURL}

  5. if the command run successfully you will get this output.
    restore SharePoint content db

  6. Get the list of all site collections that is stored on content database that has been Migrated. (This stage is to see if your migration plan is working properly)

    Get-SPContentDatabase | where {$_.Name -eq "WSS_Content_V2" } | select Sites | Format-List


See Also

If you don’t ask, the answer is always NO!
...