Keeping two sharepoint list in sync when located in 2 different servers
I two lists one is on site A which is on server A and the second one on site B on server B So i decided to use Powershell to export the list to a csv file on site A and then grab the export (the csv file)and load it to the list on site B. But i only want to export the new items if any. Any ideas how i could only pick up the new items from a list. the new image will only show is if the date/time is less than two days old on the item lists. Thanks in Advance
July 6th, 2010 3:46pm

Hi Aaron, I am not sure there is a great way to do exactly what you’re talking about. When automating data migration from one farm to another you would typically want to rely on things like content deployment or stsadm export/import. The difficulty with only migrating the changes comes into play when trying to analyze what is new and what is not new. Content Deployment is useful here as it is able to take advantage of a change token. The problem is that Prime will not all you to content deploy changes for just a list. The lowest supported level of incremental content deployment available is for an individual web. That being said, Prime will allow you to deploy the entire list, without also having to deploy the web (it is just that prime cannot do so incrementally). If you want to get creative I’m sure there is a way to get this automated, it’s just that the solution would need to become much more complex and would probably end up being less efficient than just doing the entire list each time. To help get you started, here is some sample code //Create the export object SPExportObject exportObject = new SPExportObject(); exportObject.Id = list.ID; exportObject.Type = SPDeploymentObjectType.List; //configure the export object using spexportsettings SPExportSettings settings = new SPExportSettings(); settings.SiteUrl = "http://SiteCollectionURL"; settings.ExportMethod = SPExportMethodType.ExportAll; settings.BaseFileName = ("export.cmp"); settings.FileLocation = @"c:\export"; //Finally SPExport export = new SPExport(settings); export.Run(); //Here is how you get the change token for incremental deployments string ChangeToken = settings.CurrentChangeToken; settings.ExportChangeToken = ChangeToken; Most of the data above was pulled from: http://blogs.technet.com/b/stefan_gossner/archive/2007/08/30/deep-dive-into-the-sharepoint-content-deployment-and-migration-api-part-1.aspx I hope this helps.. Reagrds, Hiran Microsoft Online Community Support
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2010 5:35am

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

Other recent topics Other recent topics