[Users] engine backup and recovery

Sven Knohsalla s.knohsalla at netbiscuits.com
Mon Nov 26 14:36:06 UTC 2012


Hi Jonathan,

This is the script we use in our company for ovirt-engine backups:

#!/bin/bash

DB_EXPORT_PATH=/usr/share/ovirt-engine/db-backups
DB_BKUP_FILENAME=dump_engine_`date "+%Y%m%d_%H%M"`.sql
DB_NAME=engine

ENGINE_BKUP_FILENAME=bkup_engine_conf_`date "+%Y%m%d_%H%M"`.tgz

ENGINE_CONF='/etc/jboss-as/jboss-as.conf
            /etc/ovirt-engine
            /etc/pki/ovirt-engine
            /usr/share/ovirt-engine/dbscripts
            /usr/share/ovirt-engine/conf
            /usr/share/ovirt-engine/resources/jboss
            /root/.pgpass
            /root/.rnd'

# Perform DB-Backup
pg_dump -C -E UTF8 --column-inserts \
                   --disable-dollar-quoting \
                   --disable-triggers \
                   -U postgres \
                   --format=p \
                   -f $DB_EXPORT_PATH/$DB_BKUP_FILENAME \
                   $DB_NAME

# Perform backup of Engine Configuration
tar zcf $DB_EXPORT_PATH/$ENGINE_BKUP_FILENAME $ENGINE_CONF

# Copy Backups to SMB Backup storage
cp $DB_EXPORT_PATH/$DB_BKUP_FILENAME $DB_EXPORT_PATH/$ENGINE_BKUP_FILENAME /mnt/backup

# Remove older backups
find $DB_EXPORT_PATH -mtime +5 -exec rm {}\;
find /mnt/backup -mtime +5 -exec rm {}\;

We have this VM running in a separate KVM Fail-over Cluster, based on LVM.
Generate one or more LVM snapshots (can also be done via monthly cronjobfor example) of your engine + data/db backups of your engine should be enough.

Please notice this bash script is currently working for oVirt engine 3.0, so you will maybe need some customizations for 3.1?


Best,
Sven.

Von: users-bounces at ovirt.org [mailto:users-bounces at ovirt.org] Im Auftrag von Jonathan Horne
Gesendet: Montag, 26. November 2012 15:26
An: users at ovirt.org
Betreff: [Users] engine backup and recovery

Is there an accepted method to keep the engine backed up for use in disaster recovery scenario?  I'm new to postgres, so I'm not sure how to keep it happy with dumps and restores.  I've not yet seen a disaster check sheet for recovery, but that doesn't mean I didn't google good enough.

Is there a workable process for how this would be recovered after total (engine) system failure?

Thanks,
jonathan



________________________________
This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind SKOPOS to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20121126/f7edf51e/attachment-0001.html>


More information about the Users mailing list