Yair Zaslavsky has submitted this change and it was merged.
Change subject: core: Unable to restore from 3.1 LogCollector...
......................................................................
core: Unable to restore from 3.1 LogCollector...
Enhancing restore.sh to handle TAR files
backup files created with LogCollector on 3.1 will fail to restore.
This is due to the fact that LogCollector is using PG pg_dump utility
with the TAR format in order to backup the database.
Unfortunately, there is a bug (Tom Lane claims that this is a feature,)
that in case that TAR format is used the -c flag of pg_dump is not
honoured and will create always DROP statements for all database objects
in the generated restore.sql script.
(See
http://www.postgresql.org/message-id/E1TrqX7-0002qd-4e@wrigleys.postgresq...)
The DROP statements caused DB errors when attempting to restore the
backup by
restore.sh was enhanced to check for the backup file type and handle it
differently if it is a TAR.
Steps to restore database:
1) drop existing DB with dropdb
2) re create a new blank db with the same name with createdb
3) use restore.sh to restore database from the backup file
Change-Id: Id17f718d5acf7a4df00092875d308f52e6dd7e3f
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=960760
Signed-off-by: Eli Mesika <emesika(a)redhat.com>
---
M backend/manager/dbscripts/restore.sh
1 file changed, 43 insertions(+), 8 deletions(-)
Approvals:
Yair Zaslavsky: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/15068
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id17f718d5acf7a4df00092875d308f52e6dd7e3f
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Alex Lourie <alourie(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Kiril Nesenko <knesenko(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>