Keeping version history while copying documents/libraries
I'm using SP 2007 and I need to make a backup of a document library containing Infopath forms. However, the problem is that I don't know how to retain the version history of the forms. This is very important. Is the only way to do this to program againt the object model? I found a older post that holds a link to a solution, but the link is broken, so I can't see the solution (http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/b850bb4e-eb87-46db-8326-6b5f2c7f0c77/) Does anybody have a idea about how to best do this?
February 27th, 2012 2:11pm

If you use stsadm to export the web containing the forms you can specify the -version parameter to retain versions or otherwise. http://technet.microsoft.com/en-us/library/cc262759(v=office.12).aspx If you want to move only one library then I believe the Gary Lapointe extensions to stsadm will permit this. The Lapointe extensions, in my experience, are excellent and to be recommended. http://blog.falchionconsulting.com/index.php/2007/09/importexportcopy-lists/
Free Windows Admin Tool Kit Click here and download it now
February 27th, 2012 3:25pm

Hi, There are two ways to do this without object model. 1. If you are copying within the same site collection then you can use site manager to copy the same and it will work out for you. 2. If you are doing for other site collection you can use STSADM export include allversions to copy the same.Thanks, Rahul Rashu
February 28th, 2012 1:06am

Hi, It seems that in SharePoint 2007 if we want to keep versions, we can only export or import the whole site or sub site, not a single library or list. We can use this command to export the site (sub3 for example) which contains the library. stsadm o export url http://../sites/sub3 -filename sub3 -includeusersecurity -haltonfatalerror -versions 4 -cabsize 1023 Then the sub3.cmp file will be generated. Now create a new blank sub site named sub4 for example, and then run the command. stsadm -o import -url http://../sites/sub4 -filename c:\Documents and Settings\......\sub3.cmp -includeusersecurity Then another sub3 will appear (although we named the blank site sub4, it will change to sub3 which comes from the .cmp file), and now we finish the backup of the document library. Note: replace the directory of the sub3.cmp file above with the directory in your machine. Come on!
Free Windows Admin Tool Kit Click here and download it now
February 28th, 2012 4:48am

Hi Rahul, However it seems that copying via site manager doesn't keep version history of the items. Can you confirm?
July 12th, 2012 8:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics