Summary
The Red Hat Enterprise Virtualization Manager includes a script to automate database backups. Using this script on your Manager server, you can protect yourself against potential data loss.
Procedure D.1. Backing up the engine database using the backup.sh script
- Change into the
/usr/share/ovirt-engine/dbscripts/directory. - Invoke
backup.shwith the-hparameter to see the available options.Usage: backup.sh [-h] [-s SERVERNAME] [-p PORT] [-d DATABASE] [-l DIR] -u USERNAME [-v] -s SERVERNAME - The database servername for the database (def. localhost) -p PORT - The database port for the database (def. 5432) -d DATABASE - The database name (def. engine) -u USERNAME - The username for the database. -v - Turn on verbosity (WARNING: lots of output) -l DIR - Backup file directory. -h - This help text. for more options please run pg_dump --help
- Invoke the
backup.shcommand again with parameters appropriate for your environment. If you are backing up the localenginedatabase, the-s, -p,and-dparameters are not necessary. Use the-lto specify the backup directory. This will cause a.sqlfile to be created in the directory you give. - Copy the
.sqlyou just created from the directory you specified to a safe remote location.
Result
You have used the backup.sh script to backup your engine database.