Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-24936

Failed to restore incremental backup with database corrupted error

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • CLOSED
    • rubygem-foreman_maintain-1.6.13
    • 0
    • Platform
    • Moderate
    • No

      Description of problem:
      Fail to restore an incremental backup with the following missing database file error:
      ~~~
      ERROR – : Failed executing PULP_SETTINGS=/etc/pulp/settings.py runuser -u pulp – pulpcore-manager migrate --noinput, exit status 1:
      psycopg2.OperationalError: FATAL: could not open file "base/12345/67890": No such file or directory
      ~~~

      Steps to Reproduce:
      1. Create a full backup of the Satellite using "satellite-maintain backup snapshot" command.
      2. After that create one or multiple incremental backups of the Satellite using "satellite-maintain backup snapshot --incremental" command.
      3. Restore the backups in the target Satellite using "foreman-maintain restore".

      Actual results:
      Incremental backup fails with database missing file error.

      Expected results:
      Can restore successfully.

      Additional info:
      After restoring a backup, Satellite maintain will run some steps that cause database write. Therefore, the next incremental backup will fail due to data inconsistency between the restored data and the incremental backup.

      To workaround the issue, we need to run the "foreman-maintain restore" command with some skip steps, except the last incremental restore command.

      Lets say we have 1 full backup and 3 incremental backups

      To restore the full backup, run:
      ~~~
      foreman-maintain restore -y --whitelist="restore-reindex-databases,installer-upgrade,installer-upgrade-rake-task,service-start" <full backup directory>
      ~~~

      To restore 1st incremental backup, run:
      ~~~
      foreman-maintain restore -y --whitelist="restore-reindex-databases,installer-upgrade,installer-upgrade-rake-task,service-start" <incremental backup directory 1>
      ~~~

      To restore 2nd incremental backup, run:
      ~~~
      foreman-maintain restore -y --whitelist="restore-reindex-databases,installer-upgrade,installer-upgrade-rake-task,service-start" <incremental backup directory 2>
      ~~~

      To restore the last incremental backup, run:
      ~~~
      foreman-maintain restore -y <last incremental backup directory>
      ~~~

            egolov@redhat.com Evgeni Golov
            rhn-support-hyu Hao Chang Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: