Description of problem: Using only "engine-backup --mode=restore" for restoring all possible databases from the backup archive by default. Version-Release number of selected component (if applicable): ovirt-engine-4.4.0-0.29.master.el8ev.noarch Expected results: Restore should be performed as in the example with "engine-backup --mode=restore" by default instead of using specific "--provision-all-databases" For example: storage-ge-09 ~]# engine-backup --mode=restore --file=/root/cinderlib_from_old_engine --log=/root/log_cinderlib_from_old_engine --provision-all-databases --restore-permissions Start of engine-backup with mode 'restore'
Thanks for opening this RFE. I have been thinking about opening it myself for some time now, see also bug 1530031 comment 1 (and 3 and 6), but eventually didn't handle it then. Partially copying it here. Logic should be, more-or-less: If not "--change-*db-credentials" and mode=restore and db host = 'localhost' and db port = 5432 (default) and not secured connection and not secured host validation and user=default ('engine' for engine, 'ovirt_engine_history' for dwh) and db=default and password is not empty and postgresql is stopped and perhaps pg's data directory is empty or does not exist then: provision all databases
The condition for automatically provisioning databases is: - No '--change*credentials' options passed - All databases are on 'localhost' - An attempt to connect to the databases fails Some relevant flows: I. 1. Install, setup and backup an engine. 2. Reinstall the machine, install but do not setup an engine 3. Restore with 'engine-backup --mode=restore' II. 1. Install, setup and backup an engine. 2. engine-cleanup 3. Restore This will not auto-provision, because it's still possible to connect to the databases (cleanup does not drop them), and will fail, saying you must pass one of --*restore-permissions. II. 1. Install, setup and backup an engine. 2. engine-cleanup 3. systemctl stop postgresql.service 4. rm -rf /var/lib/pgsql/data/* 5. Restore This should work.