4

We recently discovered that our Recycle Bin no longer contained items before November 2017, when we performed a Sitecore upgrade using the Sitecore Express Migration Tool (version 2.0 at the time).

Upgraded from Sitecore 7.2 Update-6 to Sitecore 8.2 Update-1 with the Express Migration Tool, and then to Sitecore 8.2 Update-5 via Sitecore's standard update packages.

We do have a database backup of the necessary tables, but are wondering the best way to restore the Recycle Bin now that it's been almost two months.

I know that dbo.Archive* tables house Recycle Bin content, and that we technically shouldn't be working with the SQL data directly, but my first thought would be to verify that information is unique and then do an INSERT from the backups to the current tables.

Is there a better/supported way to handle this restoration?

3
  • Which Sitecore version did you upgrade from and To? Jan 8, 2018 at 16:12
  • Whoops. Sorry, thought I had included that information. Question updated, but from Sitecore 7.2 Update-6 to Sitecore 8.2 Update-1 with the Express Migration Tool. Upgraded to Sitecore 8.2 Update-5 via an update package. Jan 8, 2018 at 17:02
  • Well, I feel bad about this question already being asked, but now that I see what the title and text was on the other I can see why Google and SE search didn't find it. :) Jan 9, 2018 at 13:09

1 Answer 1

3

Express migration tool does not migrate your old archived items, So your option here is to manually move these data in SQL tables, You can check this answer here where they used SQL queries to migrate the archived items, You use the same approach, There are no breaking changes in the tables schema, but make sure you try this first in a non-production environment:

USE sc820u1_master;

INSERT INTO dbo.Archive (ArchivalId, ItemId, ParentId, Name, OriginalLocation, ArchiveDate, ArchivedBy, ArchiveName)
SELECT ArchivalId, ItemId, ParentId, Name, OriginalLocation, ArchiveDate, ArchivedBy, ArchiveName 
FROM sc720u6_master.dbo.Archive;

INSERT INTO dbo.ArchivedFields (RowId, ArchivalId, VersionId, FieldId, Value, Created, Updated)
SELECT RowId, ArchivalId, VersionId, FieldId, Value, Created, Updated
FROM sc720u6_master.dbo.ArchivedFields;

INSERT INTO dbo.ArchivedItems (RowId, ArchivalId, ItemId, Name, TemplateID, MasterID, ParentID, Created, Updated)
SELECT RowId, ArchivalId, ItemId, Name, TemplateID, MasterID, ParentID, Created, Updated 
FROM sc720u6_master.dbo.ArchivedItems;

INSERT INTO dbo.ArchivedVersions (VersionId, ArchivalId, ItemId, dbo.ArchivedVersions.Language, dbo.ArchivedVersions.Version, ArchivedDate, ArchivedBy)
SELECT VersionId, ArchivalId, ItemId, Language, Version, ArchivedDate, ArchivedBy
FROM sc720u6_master.dbo.ArchivedVersions;

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