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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.2.0.Final, 4.6.2.Final
    • 5.0.0.Final
    • Storage
    • None
    • 1
      • creating a backup via the modeshape-api and a database as datastorage
      • restoring the backup via modeshape-api
    • Workaround Exists
    • 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

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            x-out_jira X-out portal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: