Description of problem: There are various issues/problems with the current implementation of engine-backup.sh: 1. Not all the files/folders that need to be backed up, are. 2. There is a conflict in SCOPE's db vs dbonly option. 3. It fails if some of the files to be backed up do not exist (which might happen e.g. when setup did not create them, based on used options) 4. It does not keep selinux contexts - this breaks a future setup after cleanup Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Should this script also start ovirt-engine/httpd so that the system is immediately usable? Similarly to after running engine-setup? Current implementation (in gerrit) does so, calling the command 'service'. Alon claims (there) that: 1. It's incorrect in principle 2. It's breaking compatibility with other OSes (gentoo, freebsd) 3. We should simply tell the user to start the engine and restart httpd
(In reply to Yedidyah Bar David from comment #2) > Should this script also start ovirt-engine/httpd so that the system is > immediately usable? Similarly to after running engine-setup? > > Current implementation (in gerrit) does so, calling the command 'service'. > > Alon claims (there) that: > 1. It's incorrect in principle > 2. It's breaking compatibility with other OSes (gentoo, freebsd) > 3. We should simply tell the user to start the engine and restart httpd I agree with Alon. A wrapper script may orchestrate additional actions, including service stop/start but he backup script should be as atomic as possible.
Just an explanation for http://gerrit.ovirt.org/20484 : Without it, restore happily restores to an existing full db, which is almost never what the user wanted.
Verified on RHEVM 3.3 IS22. reproduced with following flow: engine-setup engine-backup --mode=backup --file=somefile --log=somelog engine-cleanup droped database and user and created new ones manually engine-backup --mode=restore --file=somefile --log-somelog --change-db-credentials [all relevant new DB credentials] started ovirt-engine, restarted httpd - checked engine works fine, webadmin and DB. engine-cleanup engine-setup check that setup works fine, webadmin, DB all intact.
Closing - RHEV 3.3 Released