engine-backup(8)

NAME
engine-backup - Backup and restore ovirt-engine environment.

SYNOPSIS
engine-backup [--mode=MODE] [--scope=SCOPE] [--file=FILE] [--log=LOG_FILE]

MODES
backup Backup system into FILE (default)
restore Restore system from FILE
verify Verify FILE

SCOPES
all Complete backup/restore (default).
files Product files only.
db Database only.
dwhdb Data Warehouse database only.
cinderlibdb Cinderlib database only.

OPTIONS

--file=FILE
    File to use during backup or restore. If use backup option, default=/var/lib/ovirt-engine-backup/ovirt-engine-backup-YmdHMS.backup

--log=LOG_FILE
    Log file to use (default=/var/log/ovirt-engine-backup/ovirt-engine-<MODE>-YmdHMS.log)

--tmpdir=TEMP_DIR
    Parent of temporary directory to create (using mktemp(1)). Defaults to the TMPDIR environment variable if set, otherwise to /tmp.

--archive-compressor=COMPRESSOR
    Use COMPRESSOR to compress the backup file, can be one of:
    gzip
    bzip2
    xz
    None

--files-compressor=COMPRESSOR
    Compress the product files, same options as --archive-compressor.

--keep-temporary-data
    Do not clean up temporary data on restore.

--db-compressor=COMPRESSOR
    Compress the database, same options as --archive-compressor.

--db-dump-format=FORMAT
    Database dump format; see pg_dump(1) for details. Can be one of:

    plain    Note that with this format engine-backup does not allow backing
            up or restoring special permissions, by passing to pg_dump the
            options '--no-owner --no-privileges'.
    custom

--db-restore-jobs=JOBS
    Number of restore jobs for the database.

--provision-db
    Create a database for restore.

--change-db-credentials
    Activate the following options, to restore the database to a different location etc. If used, existing credentials are ignored.

--db-host=HOST
    Set database host.

--db-port=PORT
    Set database port.

--db-user=USER
    Set database user.

--db-passfile=PASS_FILE
    Read database password from file.

--db-password=PASSWORD
    Set database password. If PASSWORD is empty, the password is read interactively.

--db-name=NAME
    Set database name.

--db-secured
    Set a secured connection for database.

--db-secured-validation
    Validate host database.

--dwh-db-compressor=COMPRESSOR
    Compress the Data Warehouse database, same options as --archive-compressor.

--dwh-db-dump-format=FORMAT
    Data Warehouse database dump format.

--dwh-db-restore-jobs=JOBS
    Number of restore jobs for the Data Warehouse database.

--provision-dwh-db
    Create a Data Warehouse database for restore.

--change-dwh-db-credentials
    Activate the following options, to restore the Data Warehouse database to a different location etc. If used, existing credentials are ignored.

--dwh-db-host=HOST
    Set Data Warehouse database host.

--dwh-db-port=PORT
    Set Data Warehouse database port.

--dwh-db-user=USER
    Set Data Warehouse database user.

--dwh-db-passfile=PASS_FILE
    Read Data Warehouse database password from file.

--dwh-db-password=PASSWORD
    Set Data Warehouse database password. If PASSWORD is empty, the password is read interactively.

--dwh-db-name=NAME
    Set Data Warehouse database name.

--dwh-db-secured
    Set a secured connection for the Data Warehouse database.

--dwh-db-secured-validation
    Validate host for the Data Warehouse database.

--cinderlib-db-compressor=COMPRESSOR
    Compress the Cinderlib database, same options as --archive-compressor.

--cinderlib-db-dump-format=FORMAT
    Cinderlib database dump format.

--cinderlib-db-restore-jobs=JOBS
    Number of restore jobs for the Cinderlib database.

--provision-cinderlib-db
    Create a Cinderlib database for restore.

--change-cinderlib-db-credentials
    Activate the following options, to restore the Cinderlib database to a different location etc. If used, existing credentials are ignored.

--cinderlib-db-host=HOST
    Set Cinderlib database host.

--cinderlib-db-port=PORT
    Set Cinderlib database port.

--cinderlib-db-user=USER
    Set Cinderlib database user.

--cinderlib-db-passfile=PASS_FILE
    Read Cinderlib database password from file.

--cinderlib-db-password=PASSWORD
    Set Cinderlib database password. If PASSWORD is empty, the password is read interactively.

--cinderlib-db-name=NAME
    Set Cinderlib database name.

--cinderlib-db-secured
    Set a secured connection for the Cinderlib database.

--cinderlib-db-secured-validation
    Validate host for the Cinderlib database.

--no-restore-permissions
    Affects only the custom dump format. Will pass to pg_restore '--no-owner --no-privileges'.

--restore-permissions
    Affects only the custom dump format. Will not pass to pg_restore '--no-owner --no-privileges'.

--provision-all-databases
    On restore, create a PostgreSQL database for all the databases that were included in the backup.

--he-remove-storage-vm
    Removes the hosted-engine storage domain, all its entities and the hosted-engine VM during restore.
    This can be useful when using different storage on the restored system.
    The engine should usually notice this and eventually import the new storage.

--he-remove-hosts-vm
    Removes all the hosted-engine hosts during restore.
    This can be useful if some of your hosts are still alive, and/or changed, and/or you can't easily remove them for any reason.
    Not doing this is risky if some of them are still alive with running VMs on them, especially HA VMs.

--fast-restore
    The default for backup, equivalent to:
    --archive-compressor=gzip \
    --files-compressor=xz \
    --db-dump-format=custom \
    --db-compressor=None \
    --dwh-db-dump-format=custom \
    --dwh-db-compressor=None

    In addition, you should pass, when restoring:
    --db-restore-jobs=N \
    --dwh-db-restore-jobs=N
    where 'N' is around 150% of available cpu cores.

--small-size
    For a small backup file, equivalent to:
    --archive-compressor=xz \
    --files-compressor=xz \
    --db-dump-format=plain \
    --db-compressor=xz \
    --dwh-db-dump-format=plain \
    --dwh-db-compressor=xz

--fast-backup
    For a fast backup, equivalent to:
    --archive-compressor=gzip \
    --files-compressor=xz \
    --db-dump-format=custom \
    --db-compressor=None \
    --dwh-db-dump-format=custom \
    --dwh-db-compressor=None

You can use one of --fast-restore, --small-size, --fast-backup, and after that
one of the other compressor/format options for further fine-tuning.

ENVIRONMENT VARIABLES

TMPDIR
    Parent of temporary directory to create (using mktemp(1)).

OVIRT_ENGINE_DATABASE_PASSWORD
    Database password as if provided by --db-password=PASSWORD option.

NOTES
See https://www.ovirt.org/documentation/admin-guide/chap-Backups_and_Migration.html for more info.

To create a new user/database:

    create role <user> with login encrypted password '<password>';

    create database <database> owner <user> template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';

Open access in the firewall/iptables/etc. to the postgresql port, 5432/tcp by default.

Locate pg_hba.conf within your distribution, common locations are:

    /var/lib/pgsql/data/pg_hba.conf
    /etc/postgresql-*/pg_hba.conf
    /etc/postgresql/*/main/pg_hba.conf

and open access there by adding the following lines:

    host <database> <user> 0.0.0.0/0 md5 host <database> <user> ::0/0 md5

Replace <user>, <password>, <database> with appropriate values.

EXAMPLES

To do a full engine backup:

    engine-backup

To restore a backup from FILE, where engine-setup was used to set up the original engine, and used the default (automatic provisioning of all databases):

    engine-backup --file=FILE --mode=restore --provision-all-databases

BUGS
Report bugs to <http://bugzilla.redhat.com>

COPYRIGHT
Copyright oVirt Authors