Description of problem: Redeploying a new SHE and restoring a database backup fails. Backup restore fails when manually executung engine-backup --mode=restore, also when restoring backup during redeploy with (ovirt-hosted-engine-setup-2.2.30-1.el7.noarch.rpm) hosted-engine --deploy --restore-from-file=yourbackup.tar.gz Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Backup current engine engine-backup --mode=backup --scope=all --file=engine.backup --log=engine-backup.log 2. Deploy new SHE to new domain 3. Restore backup engine-backup --mode=restore \ --scope=all \ --file=engine.backup \ --log=engine-restore.log \ --he-remove-storage-vm \ --he-remove-hosts \ --restore-permissions \ --provision-dwh-db \ --provision-db Actual results: 2018-10-26 08:16:17 1874: OUTPUT: - Cleaning up temporary tables in engine database 'engine' 2018-10-26 08:16:17 1874: pg_cmd running: psql -w -U engine -h localhost -p 5432 engine -t -c SELECT count(*) as count FROM vdc_options WHERE option_name='DbJustRestored' and version='general' ERROR: relation "vdc_options" does not exist LINE 1: SELECT count(*) as count FROM vdc_options WHERE option_name=... ^ 2018-10-26 08:16:17 1874: FATAL: Failed checking DbJustRestored Expected results: Succesful restore and working SHE Additional info:
Can you please attach your engine-restore.log ?
Created attachment 1499251 [details] restore.log
OK, I got it from '[ovirt-users] Engine restore failing' The real error is here: 2018-10-26 08:16:17 1874: pg_cmd running: pg_restore -w -U engine -h localhost -p 5432 -d engine -j 2 /tmp/engine-backup.uqg1Ha3mFP/db/engine_backup.db pg_restore: [archiver] unsupported version (1.13) in file header So pg_restore is restoring nothing and everything else after that fails with strange results.
Can you please attach here the output of sudo -u postgres scl enable rh-postgresql95 -- pg_restore --version executed on the system where you are trying to restore that DB?
Please see:v https://github.com/PostgresApp/PostgresApp/issues/440
@Simone [root@ovirt ~]# sudo -u postgres scl enable rh-postgresql95 -- pg_restore --version could not change directory to "/root": Permission denied pg_restore (PostgreSQL) 9.5.9
(In reply to Brett Maton from comment #6) > @Simone > > [root@ovirt ~]# sudo -u postgres scl enable rh-postgresql95 -- pg_restore > --version > > could not change directory to "/root": Permission denied > pg_restore (PostgreSQL) 9.5.9 According to https://github.com/PostgresApp/PostgresApp/issues/440 the issue has been fixed with 9.5.12. Are you using ovirt-engine-appliance? which version? Can you please update you scl postgres there and try again?
Updating the appliance (4.2-20180903.1.el7) appears to have solved the problem hosted-engine --deploy --noansible ... Make a selection from the options below: (1) Continue setup - oVirt-Engine installation is ready and ovirt-engine service is up (2) Abort setup (3) Power off and restart the VM (4) Destroy VM and abort setup (1, 2, 3, 4)[1]: #### on SHE: yum upgrade --exclude ansible engine-backup --mode=restore --scope=all --file=engine.backup --log=engine-restore.log --he-remove-storage-vm --he-remove-hosts --restore-permissions --provision-dwh-db --provision-db engine-setup --offline ### Continue deployment on physical host
Updating the appliance has fixed the database restore problem, however the new hosted storage domain has failed to import correctly and is showing as 'Locked' in the UI.
(In reply to Brett Maton from comment #8) > Updating the appliance (4.2-20180903.1.el7) appears to have solved the > problem OK, closing this as not a bug. (In reply to Brett Maton from comment #9) > Updating the appliance has fixed the database restore problem, however the > new hosted storage domain has failed to import correctly and is showing as > 'Locked' in the UI. This is definitively due to https://bugzilla.redhat.com/1620314 and it will be fixed with 4.2.7. If you are in hurry I'd suggest to use (but with an up to date appliance) hosted-engine --deploy --restore-from-file=yourbackup.tar.gz from with ovirt-hosted-engine-setup-2.2.30-1.el7.noarch.rpm from RC repo.