At Sharepoint 2010 there is a large list (more than 10k entries) with attached files. How to make the same in the new site collection? Now I do through export-import:
SPList list = new SPSite("http://localhost/").OpenWeb("sourceSite").Lists["Список"]; SPExportObject exportObject = new SPExportObject(); exportObject.Id = list.ID; exportObject.Type = SPDeploymentObjectType.List; SPExportSettings exportSettings = new SPExportSettings(); exportSettings.SiteUrl = "http://localhost/destSite"; exportSettings.ExportMethod = SPExportMethodType.ExportAll; exportSettings.FileLocation = @"c:\export"; exportSettings.FileCompression = false; exportSettings.ExportObjects.Add(exportObject); SPExport export = new SPExport(exportSettings); export.Run(); SPImportSettings importSettings = new SPImportSettings(); importSettings.SiteUrl = "http://localhost/destSite"; importSettings.WebUrl = "http://localhost/destSite"; importSettings.FileLocation = @"c:\export"; importSettings.FileCompression = false; importSettings.RetainObjectIdentity = false; SPImport import = new SPImport(importSettings); import.Run(); But this solution does not save the history of changes to objects.