Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2611

Backup and Restore does not work with database because there are duplicate IDs in the backup

    Details

    • Story Points:
      1
    • Steps to Reproduce:
      • creating a backup via the modeshape-api and a database as datastorage
      • restoring the backup via modeshape-api
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Manually edit the backup content (either inside the zip or not) and look for a document which contains in its id the jcr:system/mode:metadata string. You should find 2 documents with the same ID: one towards the beginning the of the file and one towards the end of the file.

      The workaround is to manually remove the first of the two occurrences.

      Show
      Manually edit the backup content (either inside the zip or not) and look for a document which contains in its id the jcr:system/mode:metadata string. You should find 2 documents with the same ID : one towards the beginning the of the file and one towards the end of the file. The workaround is to manually remove the first of the two occurrences.

      Description

      When creating a backup from our Modeshape-Datastore (it's postgres as db in the background) the system-node is written twice into the backup-file.
      Creating the backup file works like a charm.

      But if we want to restore the backup, our database complains about a duplicate key, coming from the double system-node entry.

      If we now delete the second system-node entry in the backup file, we can restore the backup without any errors.

      This issue can easily be fixed with removing the "PHASE2" in BackupService.execute() due to the system-node is already saved in "PHASE1".
      If you can see it, here is the commit in our fork

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                x-out X-out portal
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: