Project

General

Profile

Bug #23107

katello-restore is not properly restoring the incremental backup

Added by Christine Fouant about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
High
Category:
Backup & Restore
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1497858

Description of problem:
When restoring (using katello-restore) a full backup taken via katello-backup, the full backup is correctly restored. And according to the documentation, we should then re-run katello-restore for each incremental directory.

Looking at the katello-restore script logic, we can see that reset_katello is run every time. This would drop the database and make them unusable after restoring an incremental.

This issue is happening with the offline backup, which is the default behavior of katello-backup.

Version-Release number of selected component (if applicable):
6.2

How reproducible:
100%

Steps to Reproduce:
1. Take a full backup # katello-backup /backup

2. Once the full backup is finished, run an incremental # katello-backup /backup --incremental /backup/katello-backup-2017-10-02T14\:13\:51-04\:00/

3. Restore the full backup # katello-restore /backup/katello-backup-2017-10-02T14\:13\:51-04\:00/

4. Restore the incremental backup # katello-restore /backup/katello-backup-2017-10-02T14\:40\:29-04\:00/

Actual results:
Broken postgresql database.

FATAL: database "foreman" does not exist
DETAIL: The database subdirectory "base/41146" is missing.
Run `$ bin/rake db:create db:migrate` to create your database (ActiveRecord::NoDatabaseError)

Expected results:
Have the full backup and incremental to get restored correctly in a consistent state.

Additional info:
When decompressing the database archive manually (pgsql_data.tar.gz) one after the other, the postgresql database is restored to a working state.

History

#1 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-packaging/pull/2311 added

#2 Updated by John Mitsch about 3 years ago

  • Legacy Backlogs Release (now unused) set to 338

#3 Updated by Eric Helms almost 3 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF