agreed, it looks like OAK-2049. you need to re-run the upgrade using an oak-core version that contains the fix. Otherwise, you'll have to identify the broken node [0] and try to remove it manually using the oak-console tool, then reimport it from the old instance again. This is not guaranteed to always work, so the better option is to re-run the upgrade.
best, alex [0] Identifying broken nodes due to OAK-2049 can be done via the oak-console using a node count script [0] which will point out the paths to broken nodes: https://gist.github.com/alexparvulescu/e7067bcb86c89bef66c8 On Mon, Oct 20, 2014 at 9:28 AM, Michael Dürig <[email protected]> wrote: > > Hi, > > This most likely means your repository got corrupted due to OAK-2049 and > the backup tools detects this and fails. This can happen when you run a > version of Oak that includes the fix for OAK-2049 on a repository that has > been created with a version predating the fix. > > You need to bring your repository into a consistent state first and then > attempt the backup again. Not sure what's the best approach here though. > @Alex, how did we go about in here in the past? > > Michael > > > > On 17.10.14 5:04 , Kamil Ciecierski wrote: > >> Hi, All >> >> I am testing Oak Run command tool and trying to backup tar AEM 6 SP1 Oak >> repository. I figured it out that the AEM must be shutdown when I using >> Oak >> Run, however I am receiving the error when I am doing command: >> >> D:\workspace\oak\oak-run\target>java -jar oak-run-1.1-SNAPSHOT.jar backup >> D:\cq\aem6-sp1\crx-quickstart\repository\segmentstore >> D:\workspace\oak\backup >> Apache Jackrabbit Oak 1.1-SNAPSHOT >> Exception in thread "main" java.lang.IllegalStateException >> at >> com.google.common.base.Preconditions.checkState(Preconditions.java:134) >> at >> org.apache.jackrabbit.oak.plugins.segment.SegmentWriter. >> flush(SegmentWriter.java: >> 195) >> at >> org.apache.jackrabbit.oak.plugins.segment.SegmentWriter. >> prepare(SegmentWriter.java: >> 329) >> at >> org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeValueRecord( >> SegmentWriter.java: >> 562) >> at >> org.apache.jackrabbit.oak.plugins.segment.SegmentWriter. >> writeLargeBlob(SegmentWriter.java: >> 790) >> at >> org.apache.jackrabbit.oak.plugins.segment.SegmentBlob. >> clone(SegmentBlob.java: >> 181) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor. >> compact(Compactor.java: >> 242) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor. >> compact(Compactor.java: >> 197) >> at org.apache.jackrabbit.oak.plugins.segment.Compactor. >> access$000 >> (Compactor.java:49) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor$ >> CompactDiff.propertyAdded(Compactor.java: >> 106) >> at >> org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState. >> compareAgainstEmptyState(EmptyNodeState.java: >> 155) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor$ >> CompactDiff.childNodeAdded(Compactor.java: >> 129) >> at >> org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState. >> compareAgainstEmptyState(EmptyNodeState.java: >> 160) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor$ >> CompactDiff.childNodeAdded(Compactor.java: >> 129) >> at >> org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState. >> compareAgainstEmptyState(EmptyNodeState.java: >> 160) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor$ >> CompactDiff.childNodeAdded(Compactor.java: >> 129) >> at >> org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState. >> compareAgainstEmptyState(EmptyNodeState.java: >> 160) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor$ >> CompactDiff.childNodeAdded(Compactor.java: >> 129) >> at >> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState. >> compareAgainstBaseState(SegmentNodeState.java: >> 513) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor. >> process(Compactor.java: >> 85) >> at >> org.apache.jackrabbit.oak.plugins.segment.Compactor. >> compact(Compactor.java: >> 90) >> at >> org.apache.jackrabbit.oak.plugins.backup.FileStoreBackup.backup( >> FileStoreBackup.java: >> 78) >> at org.apache.jackrabbit.oak.run.Main.backup(Main.java:227) >> at org.apache.jackrabbit.oak.run.Main.main(Main.java:138) >> >> >> I also made the test for AEM using MongoDB and the backup was done >> successfully, but I cannot made restore back, because I am receiving >> error: >> >> Exception in thread "main" java.lang.IllegalArgumentException: builder >> must >> be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder >> at >> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore. >> asDocumentRootBuilder(DocumentNodeStore.java: >> 1704) >> at >> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge( >> DocumentNodeStore.java: >> 1308) >> at >> org.apache.jackrabbit.oak.plugins.backup.FileStoreRestore.restore( >> FileStoreRestore.java: >> 71) >> at >> org.apache.jackrabbit.oak.plugins.backup.FileStoreRestore.restore( >> FileStoreRestore.java: >> 59) >> at org.apache.jackrabbit.oak.run.Main.restore(Main.java:240) >> at org.apache.jackrabbit.oak.run.Main.main(Main.java:141) >> Is there anything I am doing wrong? I'd be grateful for the response. >> >> >> Best regards, >> >> *Kamil Ciecierski* >> Software Engineer >> >> Cognifide Polska Sp. z o. o. >> Skype: kamilc89 >> >>
