Project

General

Profile

Actions

Bug #30156

closed

Local database backup/restore doesn't work

Added by Lance Dillon over 4 years ago. Updated 10 months ago.

Status:
Rejected
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Testing backup and restore. If postgres is local, it copies the data dir, otherwise it does a pg_dump. When performing a restore, the restore of the data dir doesn't work correctly. The database is basically empty, and there are some consistency errors (I get errors like "Can't find product "2""). However, I tested doing a pg_dump -c for each database (foreman, candlepin, and pulpcore), and restoring those files worked, the data is there, hammer commands (and ui) shows information. I haven't dug into how the data_dir backup and restore is done to say where the problem might lie.

An option would be to add a parameter specifying a pg_dump, regardless of whether db is local or not.

This ticket could track the fix of this, and possibly the addition of the parameter.

Actions #1

Updated by Lance Dillon over 4 years ago

The option --include-db-dumps takes care of that, but since the local copy doesn't seem to work, maybe this should be included by default?

Actions #2

Updated by Amit Upadhye over 4 years ago

Lance Dillon wrote:

The option --include-db-dumps takes care of that, but since the local copy doesn't seem to work, maybe this should be included by default?

Were you using foreman 2.0 or higher while taking backup and restore ? I think this issue is similar to https://projects.theforeman.org/issues/30469 . The pr has been created, request to check if it works for you.

Thank You.

Actions #3

Updated by Eric Helms 10 months ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF