Ovirt 4.2.x Backup/Restore/Migrate

Backup Hosted Engine

342 views March 31, 2018 August 24, 2018 zipadmin 1

It’s a good idea to know this simple backup process to make sure you hosted engine can be recovered:

engine-backup --mode=backup --file=backup1 --log=backup1.log

Ref: https://www.ovirt.org/develop/release-management/features/integration/engine-backup/


If you are interested in automating your engine backups, here is what I do:


On Your Engine VM

  • vi /etc/fstab /mnt/backups nfs rw,async,hard,intr,noexec 0 0
  • mkdir /mnt/backups
  • mount /mnt/backups
  • mkdir /mnt/backups/engine
  • vi /root/backup_my_engine.sh
    • #!/bin/bash
      #required for cronjob
      DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
      cd $DIR
      export TERM=xterm
      BUDATE=$(date +%Y-%m-%d-%H%M%S)
      engine-backup --mode=backup --scope=all --file="engine-backup${BUDATE}.bak" --log="engine-backup${BUDATE}.log"
      cp /root/engine-backup${BUDATE}* /mnt/backups/engine/
      rm /root/engine-backup${BUDATE}*

  • chmod 700 /root/backup_my_engine.sh
  • vi /etc/crontab
    1 1 * * * root /root/backup_my_engine.sh > /dev/null 2>&1


    That should do it. Now each day at 1:01 AM, your Engine will backup to your NFS with a date stamped backup/log file.

Was this helpful?