----- Original Message -----
From: "Steve Dainard" <sdainard(a)miovision.com>
To: "users" <users(a)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