Powershell command to backup and restore SharePoint list

sns 9,246 Reputation points
2023-04-06T19:53:03.2266667+00:00

I would like to take SharePoint list backup with Powershell and restore it with Powershell please share if there is any specific command to perform these operations. and before restore operation do I need to create empty list? it’s Sharepoint 2016

Microsoft 365 and Office SharePoint Server For business
0 comments No comments
{count} votes

Accepted answer
  1. Yanli Jiang - MSFT 31,596 Reputation points Microsoft External Staff
    2023-04-07T09:36:41.88+00:00

    Hi sns,

    You can you this command to backup(export) :

    Export-SPWeb <Site URL> -Itemurl  <Relative path of List or Library> -path <Backup-path>
    

    And this command to restore(import):

    	
    Import-SPWeb <Site URL> -Path <Backup-path>
    

    For example:

    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
    Export-SPWeb http://sp16 -itemurl "/Lists/List11" -path "C:\List11.bak"
    
    Import-SPWeb 
    

    For more information, please refer to: https://www.sharepointdiary.com/2013/10/backup-restore-export-import-sharepoint-2013-lists-using-powershell.html

    And this will help you distinguish between using the command in different situations: https://edanan.wordpress.com/2012/05/21/export-spweb-the-url-provided-is-invalid/

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.