Backup

Use the engine-backup command to create a backup. The usage and mandatory arguments with the command are listed below:
1. –mode=MODE
where MODE -> for collecting backup it should be set to “backup”

2. –scope=SCOPE
where SCOPE -> can be set to “all” or “files” or “db” or “dwhdb”
if set to “all” everything below will be collected
if set to “files” product files only will be collected
if set to “db” Engine database only will be collected
if set to “dwhdb” Data Warehouse database only will be collected
The option –scope can be passed more than once, with different scopes.

3. –file=FILE
where FILE -> the path and filename for the backup

4. –log=FILE
where FILE -> the path and filename for the backup logs

For more options run:

Example:

# engine-backup --mode=backup --scope=all --file=/enginebackups/enginebackup200419 --log=/enginebackup200419.log
Backing up:
Notifying engine
- Files
- Engine database 'engine'
- DWH database 'ovirt_engine_history'
Packing into file '/enginebackups/enginebackup200419'
Notifying engine
Done.

Restore

Before restoring from a backup make sure to cleanup the engine and reinstall:

1. Clean up the existing engine setup:

# engine-cleanup --log=FILE

where FILE -> the path and filename for the cleanup logs.

2. Uninstall ovirt-engine package:

# yum remove ovirt-engine

3. Using ovirt-provide-ovn requires the below additional steps to reset the certificate authority (CA) file. If ovirt-provider-ovn is not used then skip this step:

# systemctl restart ovn-northd.service
# ovn-sbctl del-ssl

4. Reinstall ovirt-engine package:

# yum install ovirt-engine

5. Restore the engine from backup:

# engine-backup --mode=restore --file=FILE --log=FILE --restore-permissions

Usage:

1. –mode=MODE
where MODE -> for collecting backup it should be set to “restore”

2. –file=FILE
where FILE -> the path and filename for the backup file from which to restore

3. –log=FILE
where FILE -> the path and filename for the restore logs

4. –restore-permissions
Either –no-restore-permissions or –restore-permissions option is required when the backup is a custom dump

6. Then run below command to setup the engine: