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

I'm going to export a SharePoint document list from one site to another, however my list is huge and has more than 500 items with attached files.

I tried to Save document library as template  from the list settings, as shown in the following image:

Save document library as template

 

But I receive the message "Something went wrong" and the operation has failed,

How To export SharePoint list?


1 Answer

2 like 0 dislike
by 152 169 345
selected by
 
Best answer

How to Export SharePoint List with the attachments in SharePoint 2019?

You have three options to export your list with an attachment

  1. Save a List as a Template with content
  2. Using Export-SPWeb PowerShell Script.
  3. Using a 3rd party tool like ShareGate.

1) Save List as a Template Limitations.

First of all, you should be aware that the default list template size is 52428800 (About 50 MB), and If you have tried to save a list as a template that includes contents that size exceeds 50 MB, you will get the below error

The list is too large to save as a template. The size of a template cannot exceed 52428800 bytes

Fortunately, you can increase the site template limit in SharePoint Server by using PowerShell as mentioned at Exceed Site/list Template Size limit in SharePoint Server But I don't recommend this option

Note: You can’t also increase the SITE template size limit in SharePoint Online, read more at The list is too large to save as a template SharePoint online


2) Export SharePoint List with the attachments in SharePoint 2019

You can use [Export-SPWeb][4] to export a subsite, list, or library as below

Export-SPWeb "Site URL" -Path "F:\ListName.cmp" -ItemURL "/Lists/{ListUrl}" -IncludeUserSecurity -IncludeVersions All 

and to import this back to another site, you have to use the below cmdlet

Import-SPWeb "Site URL" -Path "F:\ListName.cmp" -ItemURL "/Lists/{ListUrl}" -force -IncludeUserSecurity -UpdateVersions Overwrite
If you don’t ask, the answer is always NO!
...