Index: oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/tool/SegmentStoreMigrator.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/tool/SegmentStoreMigrator.java (revision 3ca7adddb36fb894d4a482235baffce87c6fefb9) +++ oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/tool/SegmentStoreMigrator.java (date 1604504533030) @@ -155,6 +155,13 @@ SegmentArchiveManager targetManager = target.createArchiveManager(false, false, new IOMonitorAdapter(), new FileStoreMonitorAdapter(), new RemoteStoreMonitorAdapter()); List targetArchives = targetManager.listArchives(); + + if (appendMode && !targetArchives.isEmpty()) { + //last archive can be updated since last copy and needs to be recopied + String lastArchive = targetArchives.get(targetArchives.size() - 1); + targetArchives.remove(lastArchive); + } + for (String archiveName : sourceManager.listArchives()) { log.info("{}/{} -> {}", sourceName, archiveName, targetName); if (appendMode && targetArchives.contains(archiveName)) { Index: oak-segment-aws/src/main/java/org/apache/jackrabbit/oak/segment/aws/tool/AwsSegmentStoreMigrator.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- oak-segment-aws/src/main/java/org/apache/jackrabbit/oak/segment/aws/tool/AwsSegmentStoreMigrator.java (revision 3ca7adddb36fb894d4a482235baffce87c6fefb9) +++ oak-segment-aws/src/main/java/org/apache/jackrabbit/oak/segment/aws/tool/AwsSegmentStoreMigrator.java (date 1606906872724) @@ -153,6 +153,13 @@ SegmentArchiveManager targetManager = target.createArchiveManager(false, false, new IOMonitorAdapter(), new FileStoreMonitorAdapter(), new RemoteStoreMonitorAdapter()); List targetArchives = targetManager.listArchives(); + + if (appendMode && !targetArchives.isEmpty()) { + //last archive can be updated since last copy and needs to be recopied + String lastArchive = targetArchives.get(targetArchives.size() - 1); + targetArchives.remove(lastArchive); + } + for (String archiveName : sourceManager.listArchives()) { log.info("{}/{} -> {}", sourceName, archiveName, targetName); if (appendMode && targetArchives.contains(archiveName)) {