Sharepoint - Copying a List or Document Library from one farm to another

The only way I know is to export and import the list/library. Export your list in the source farm and import it to the destination farm.

To export a site, list or document library by using Windows PowerShell

To import a site, list or document library by using Windows PowerShell

If you can manage to read an article then I prefer the below. Have a glance at it. It will help you understand what exact things are involved when you move a site/list to another SharePoint farm/site.

Please note the below article is intended for 2010 but is also applicable for 2013.

SharePoint: how to move entire list/library together with content and full security to another site


First of all, are both the farms running SharePoint Foundation? Are both the farms on the same patch level? If they are not running on the same patch level, you won't be able to restore a copied document library. Does any of the sites use the feature Publishing Infrastructure?

Is versioning enabled?

Do the library have custom permissions?

There's multiple ways of moving a library, if you wanna use the UI, just head to the library settings and save the document library as a template, and include the content. This will however change all the fields for created, created by, modified and modified by.

If you are okay with this, the saved template/copy of the library will be found on a site collection level, under List Templates. (Your sitecollection url + _catalogs/lt/Forms/AllItems.aspx).

Download the library and upload it to the new site in the list template gallery where you wanna use it. Now it should be available as a list template and you can create a new library from the template (with all the content included).

If you need to have all the fields mentioned above intact, you can do it with PowerShell. This requires that you have access to the servers for both farms.

You can export a single library by using the ItemUrl parameter for selecting a single list or library. Also check up the paramameter IncludeUserSecurity if it is applicable for you.

Add-pssnapin Microsoft.sharepoint.powershell 

Export-SPWeb http://site –Path "c:\temp\site export.cmp" -ItemURL "/subsite/documentsLibrary" 

And then import it in the other farm:

Add-pssnapin Microsoft.sharepoint.powershell 

Import-SPWeb http://site –Path "c:\temp\site export.cmp"

Note that all the users need to exist in both farms to be mapped correctly for the created by and modified by field. Otherwise the accounts that run the PowerShell Commands will be the author of the document.

Tags:

List