Do you need to delete a site collection prior to restoring? Sharepoint 2019

Tevon2.0 1,101 Reputation points
2023-06-08T19:52:12.1233333+00:00

Greetings,

I am working in SharePoint 2019 on Prem and seeking to update my two SharePoint communications websites in my dev enviroment to match the versions in my prod. I backed up both of the sites in my prod server and placed them in folders within the file viewer on my dev environment. I plan to use SharePoint Management Powershell however I am not sure of the best method of updating the files without causing issues in my farm or duplicates. What is the best route to follow to update the sites?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,232 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,576 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,813 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,093 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChengFeng - MSFT 5,010 Reputation points Microsoft Vendor
    2023-06-09T09:11:36.3933333+00:00

    HI @Tevon2.0 ,

    To update your SharePoint 2019 communication sites in your development environment to match the versions in your production environment, you can follow these steps:

    1. Ensure that your development environment is properly configured and running SharePoint 2019.
    2. Take a backup of your existing communication sites in the development environment to ensure you have a restore point in case anything goes wrong.
    3. Copy the backup files of your production communication sites to the corresponding folders in the file viewer of your development environment. Make sure the folder structure matches.
    4. Open SharePoint Management Shell on your development environment as an administrator.
    5. Connect to the SharePoint farm by running the following command:Replace with the URL of your SharePoint Central Administration site.
    Connect-PSService -FarmUrl <central_admin_url>
    

    <central_admin_url>

    1. Run the following command to restore the backup of your communication sites to your development environment:Replace with the URL of the site where you want to restore the backup and with the full path to the backup file in the file viewer.
    Restore-SPSite -Identity <site_url> -Path <backup_file_path> -Force
    

    <site_url><backup_file_path>

    1. Repeat step 6 for each communication site you want to update in the development environment.
    2. After the restore process completes, you may need to perform additional configuration steps specific to your sites, such as updating site URLs, adjusting permissions, or configuring site features.
    3. Test the updated communication sites in your development environment to ensure everything is working as expected.

    It's important to note that restoring a site backup will overwrite the existing site in the development environment. Therefore, it's crucial to have a backup and thoroughly test the restored sites before performing these steps in a production environment.

    Additionally, consider updating any customizations or configurations specific to your production environment to match the development environment if necessary.

    Make sure to carefully review and test the steps in a non-production environment before proceeding with your production environment to minimize the risk of issues or duplicates.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards

    Cheng Feng