Red Hat Bugzilla – Bug 1002401
[RFE] backup/restore: support restoring to different database location
Last modified: 2014-01-21 12:36:22 EST
This came up in presentation to GSS and it makes sense.
1. When restoring a machine, it does not mean that the database location is the same.
2. The backup/restore procedure can be used in order to move the database from one location (example: local) to another location (example: remote).
These two can be easily added to current implementation.
Comments below copied from gerrit:
Includes many other fixes to be able to actually use it.
Verified only on fedora 19:
engine-setup (chose to have it provision a local db, the default)
engine-backup --mode=backup --file=oeb4-local-db --log=oeb4.log
manually created a db in another host and opened access to it
Created a file "p1" with the remote's password engine-backup --mode=restore --file=oeb4-local-db --log=oeb4-restore1.log --db-host=didi-lap --db-pass=p1
Had to manually add ovirt services to firewalld's public zone and reload it
engine seems to work
engine-cleanup also works well, apart from:
[WARNING] Preserving '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf' as changed since installation
Note: Passing --db-secured and/or --db-sec-validation does not change ENGINE_DB_URL, and it probably should. Not tested. It might be better to remove or disable these options for now.
*** Bug 1021448 has been marked as a duplicate of this bug. ***
Verified on RHEVM 3.3 IS21.
2.engine-backup --mode=backup --scope=db --file=/tmp/oeb4-local-db --log=/tmp/oeb4.log
3. created DB on remote host as per instructions on engine-backup --help
4. service ovirt-engine stop
5. engine-backup --mode=restore --scope=db --change-db-credentials --file=/tmp/oeb4-local-db --log=/tmp/oeb4-restore1.log --db-host=monique-vds05.tlv.redhat.com --db-port=5432 --db-user=engine --db-name=engine --db-password=engine
6. service ovirt-engine start; service httpd restart.
7. engine works fine, elements added to engine (Datacenter, cluster...) appear on remote database.
Found a bug : without http://gerrit.ovirt.org/21784 , engine-backup --mode=restore and without --change-db-credentials will empty 10-setup-database.conf and so will prevent the engine from starting.
This bug is currently attached to errata RHEA-2013:15231. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.
Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:
* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')
Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.
For further details on the Cause, Consequence, Fix, Result format please refer to:
Thanks in advance.
Verified on RHEVM 3.3 IS26.
2. create DC, Cluster, add hosts etc..
3. engine-backup --mode=backup --scope=all --file=/tmp/oeb4-local-db --log=/tmp/oeb4.log
5. drop database
6. create new database with same credentials as the previous one which was backed up
7. engine-backup --mode=resore --scope=all --file=/tmp/oeb4-local-db --log=/tmp/oeb4.log
result= engine works fine with all the elements installed at stage (2) in-tact.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.