Appendix D. Backups

D.1. Backing Up the Engine Database Using the Script

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 script

  1. Change into the /usr/share/ovirt-engine/dbscripts/ directory.
  2. Invoke with the -h parameter to see the available options.
    Usage: [-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
  3. Invoke the command again with parameters appropriate for your environment. If you are backing up the local engine database, the -s, -p, and -d parameters are not necessary. Use the -l to specify the backup directory. This will cause a .sql file to be created in the directory you give.
  4. Copy the .sql you just created from the directory you specified to a safe remote location.
You have used the script to backup your engine database.