6

In SharePoint foundation 2013, How to copy a List or Document library from a site collection in one farm to a site collection in another farm?

2
  • Is it important that metadata is preserved?
    – TempaC
    Jan 13, 2016 at 10:06
  • yes the metadata should be preserved
    – Sharanya
    Jan 13, 2016 at 10:10

3 Answers 3

3

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

1
  • Thank you. I am trying the same. whether exporting a list will affect anything in existing list?
    – Sharanya
    Jan 13, 2016 at 10:24
2

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.

3
  • Thank you. Publishing infrastructure is not enabled. No Versioning and custom permissions
    – Sharanya
    Jan 13, 2016 at 10:28
  • What about the importance of having the correct created by and modified by? If you just need the library and it documents, no matter who uploaded the document, then you don't need powershell and can go with my first option Jan 13, 2016 at 11:16
  • i just have to copy documents and some custom meta data fields.
    – Sharanya
    Jan 13, 2016 at 11:21
0

You can use Metalogix tool to do this operation which helps to copy from one to another site collection. Click here to view the link.

1
  • Thank you. But i cant use any third party tool.
    – Sharanya
    Jan 13, 2016 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.