I have 2 farms inside the same domain and both farms are sharepoint on-premises 2013. Now I want to move documents inside documents libraries from the first farm to the second farm.

Inside the destination farm, I already have a site which have other list and libraries, and I added the related document libraries which mimic the docs libraries inside the source farm.

But I am not sure how I can move the docs from the docs libraries inside the source farm to the destination docs libraries while preserving their properties (such as created, createdby ,modified, modifiedby, title & name). Now all the online documentations I have read show how to move the docs inside the same site collection, using the Content and Structure approach.. but none of them show how to do this cross-farms? I am not sure if this approach which came to my mind should work:-

Using Powershell I can access the source docs using the list API, and then move the documents in a way or another into the destination farm ??

Could any one provide some sample code or adivce on the approach that I can follow?


The easiest way is to just export the library (save the document library / list as a template) if it is small enough. There are additional options available here.

  • Thanks for the reply.. but if i save the list as template, and i add a new list based on the template then all these properties will be changed ; created, created by, modified and modified by. also i do not want to move the whole site as i am not sure what are the modifications that have been made on it by the customer... also i want to move the documents into a site which already have other lists and libraries.. – john Gu Aug 22 '17 at 13:50
  • 1
    Inside the same site collection, yes. There's a lot of things SharePoint will handle for you in the background and allow a trusted amount of data to be copied with different updates (with user audit and audit time stamps intact), but if you're copying between site collections for security reasons it is basically new (untrusted) data so it generally wouldn't allow you access to the audit time stamps (or people could say documents were there all along when they were in fact added later by an admin). – Graham Aug 22 '17 at 15:35
  • 1
    When exporting you should be prompted on whether you want to include data (documents, list items, etc) or not. It should recreate in the remote site as is. The problem with doing that with document libraries can be that there is a maximum export/import size for the SP farm. Beyond that limit you have to do Powershell or you have to use a third party application. – Graham Aug 22 '17 at 16:28
  • 1
    It should import without it being the exact same patch level so long as there are hugely different builds or missing dependencies, but you can also crack open the files and edit the version if you're sure the library isn't missing anything to set a specific version number. But at that point, you're getting into a different degree of complexity with this whole solution. – Graham Aug 22 '17 at 16:41
  • 1
    An import that is corrupted or invalid should fail to import and roll itself back as needed w/o issue. – Graham Aug 22 '17 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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