
I also see this error in engine.log which repeats every second if I am trying to access the web ui. 2014-01-29 18:59:47,531 ERROR [org.ovirt.engine.core.bll.Backend] (ajp--127.0.0.1-8702-4) Error in getting DB connection. The database is inaccessible. Original exception is: UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL [{call checkdbconnection()}]; SQL state [25P02]; error code [0]; ERROR: current transaction is aborted, commands ignored until end of transaction block; nested exception is org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block It looks like the db inserted correctly, I took a quick look through some tables and can see the valid admin user, and snapshots. But I can't say for certain. The IP address of the new server does not match the IP of the old (backup file) server, would this have any impact? I would think not as its a local db. When I changed the password for the psql engine user, is there any config file this is referenced in that may not have been updated? Thanks, *Steve Dainard * IT Infrastructure Manager Miovision <http://miovision.com/> | *Rethink Traffic* 519-513-2407 ex.250 877-646-8476 (toll-free) *Blog <http://miovision.com/blog> | **LinkedIn <https://www.linkedin.com/company/miovision-technologies> | Twitter <https://twitter.com/miovision> | Facebook <https://www.facebook.com/miovision>* ------------------------------ Miovision Technologies Inc. | 148 Manitou Drive, Suite 101, Kitchener, ON, Canada | N2C 1L3 This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately. On Wed, Jan 29, 2014 at 7:06 PM, Alon Bar-Lev <alonbl@redhat.com> wrote:
----- Original Message -----
From: "Steve Dainard" <sdainard@miovision.com> To: "users" <users@ovirt.org> Sent: Thursday, January 30, 2014 1:59:08 AM Subject: [Users] engine-backup restore how to
There doesn't seem to be any solid documentation on how to use the engine-backup restore function, and I'm not able to restore a backup.
The best I've come up with is: 1. Install engine on new host 2. Stop engine 3. run engine-backup --mode=restore --file=filename --log=logfile
Fail.
Log shows: psql: FATAL: password authentication failed for user "engine" 2014-01-29 18:20:30 10285: FATAL: Can't connect to the database
4. engine-backup --mode=restore --file=engine.bak --log=logfile --change-db-credentials --db-host=localhost --db-user=engine --db-name=engine --db-password='newpassword'
Fails with same error.
the --db-password must match the user's actual password within database, --change-db-credentials does not change the password in database but the host/port/user/password that are used by enigne.
5. change user to postgres, drop the old db, create a new db named
engine,
set password for engine user same as 'newpassword'
6. engine-backup --mode=restore --file=engine.bak --log=logfile --change-db-credentials --db-host=localhost --db-user=engine --db-name=engine --db-password='newpassword'
Ok, this is correct now.
Restoring... Rewriting /etc/ovirt-engine/engine.conf.d/10-setup-database.conf Note: you might need to manually fix: - iptables/firewalld configuration - autostart of ovirt-engine service You can now start the engine service and then restart httpd Done.
7. start ovirt-engine, restart httpd, browse to web ui
Blank page, no content.
8. stop firewall, browse to web ui
Blank page, no content
9. Engine log contains:
2014-01-29 18:35:56,973 INFO [org.ovirt.engine.core.utils.LocalConfig] (MSC service thread 1-40) Value of property "SENSITIVE_KEYS" is ",ENGINE_DB_PASSWORD,ENGINE_PKI_TR UST_STORE_PASSWORD,ENGINE_PKI_ENGINE_STORE_PASSWORD". 2014-01-29 18:35:57,330 ERROR [org.ovirt.engine.core.bll.Backend] (MSC service thread 1-25) Error in getting DB connection. The database is inaccessible. Original exception is: BadSqlGrammarException: CallableStatementCallback; bad SQL grammar [{call checkdbconnection()}]; nested exception is org.postgresql.util.PSQLException: ERROR: function checkdbconnection() does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 15 2014-01-29 18:35:58,336 ERROR [org.ovirt.engine.core.bll.Backend] (MSC service thread 1-25) Error in getting DB connection. The database is inaccessible. Original exception is: UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL [{call checkdbconnection()}]; SQL state [25P02]; error code [0]; ERROR: current transaction is aborted, commands ignored until end of transaction block; nested exception is org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
It looks like the database is empty... are you sure the engine.bak is intact? does you see CheckDBConnection there?
Thanks, Alon