Overview
It is known that current Oracle VM (OVM) backup is not very practical and should be revamped soon, so Enterprise Bacula does not have a specific plugin for this technology yet. However, there is an option provided by Oracle itself that can be used with all Bacula versions.
This technique is suggested by Oracle in https://blogs.oracle.com/scoter/guest-hot-backup-ovm-34. It consists on using the ovm-bkp v1.0 – Backup Utilities for Oracle VM 3.4 scripts to perform consistent VMs backups from one OVM storage to another. The hot-backup obtained by this script is always a crash-consistent backup of the running VM; if the VM owns also physical-disks, the backup will contain only virtual-disks and so, a manual intervention is needed to have it correctly booting/starting.
The script idea is to have low-retention backups available on one OVM storage repository (e.g. days) and medium/long retention on a backup storage backed up via NDMP plugin (e.g. weeks) from the NAS equipment that hosts the OVM storages.
Although a simple Bacula Client could be installed in OVM Manager to copy the clones of the VMs, using the NDMP Plugin is important so that copies of the Clones are clientless and do not have traffic triangulating through the Manager machine, which could cause Gartalos of network, unavailability and unavailability for the service.
The retention can be managed between the two solutions (HotCloneVm script and NDMP) where:
- HotCloneVm.sh will manage the low-retention on the NFS Repository. Both Incremental and Full approaches are available with “SNAP” and “FULL”
- NDMP NAS backup will manage the long-retention provided by a backup software and another type of backup media. both Incremental and Full approaches can be managed by backup software.
Having the low-retention on the second storage will allow, moreover, to have a fast restore point for:
- Single VM file restore or a list of them. Just start the VM, that resides on the secondary repository, with a temporary IP address and get files needed.
- Entire VM restore. Stop the original VM and Start a snapshot and/or Clone/Move the FULL backup from the NFS. Y
Another option, available only with 3.4 release, is to have backups in OVA format; this option will allow having backups that can be exported/imported to further Oracle VM Pools; for example you can use OVA exported to have the same VM available on a different Oracle VM Pool (like a clone from Production to Development) or on your laptop/desktop using VirtualBox.
As illustrated in Figure 1, this is the proposed backup technique.
Figure 1. Oracle VM Backup Using the ovm-bkp v1.0 Tool and NDMP Backup Software Plugin [1]
Installation
The “ovm-bkp v1.0.1” is based on an RPM for Oracle Linux 6 and 7 and needs to be installed on Oracle VM Manager. Install the RPM such as:
rpm -ivh http://download.oracle.com/otn-pub/otn_software/ovm/ovm-bkp-1.0.1-20180510.noarch.rpm
If you need to download it, this is the URL for the RPM package: http://download.oracle.com/otn-pub/otn_software/ovm/ovm-bkp-1.0.1-20180510.noarch.rpm.
There is also an official guide for the script, that is available in https://www.oracle.com/technetwork/server-storage/vm/ovm-bkp-userguide-v1-4394642.pdf.
First of all you need to setup an ssh-key exchange to obtain a self-authenticated system:
[scoter@ovmm: ~/Documents/OVM_34/HotCloneVm_0.7a]# ./SetupSsh.sh ##################################################################################### You have to specify <guest id> or <guest name>: Use SetupSsh.sh <Oracle VM Manager host> <Linux oracle user password> <Oracle VM Manager Password> Example: SetupSsh.sh ovm-mgr.oracle.local oracle Welcome1 ########################################################################################## [scoter@ovmm: ~/Documents/OVM_34/HotCloneVm_0.7a]#
Remark: if you have already configured ssh-key exchange vs OVMCli you don’t need to execute “SetupSsh.sh” script.
To identify the backup script syntax to be used, you have only to execute the command without any option:
[scoter@myhost: ~/]# ./HotCloneVm.sh ##################################################################################### You have to specify <guest id> or <guest name>: Use HotCloneVm.sh <Oracle VM Manager password> <Oracle VM Manager host> <guest name> <Oracle VM Server Pool> <target Repository> <Backup Retention> <backup_type> <backup_type> options are (no case-sensitive): - FULL => HotClone will create a full vdisk backup on a further repository - SNAP => HotClone will create an ocfs2 reference-link snapshot of the vm on the same repository - OVA => HotClone will create a packaged OVA file on a further repository - available from 3.4 Example: HotCloneVm.sh Welcome1 ovm-mgr.local vmdb01 myPool repotarget 8d FULL (retention will be 8 days) HotCloneVm.sh Welcome1 ovm-mgr.local vmdb01 myPool repotarget d8 SNAP (retention will be 8 days) HotCloneVm.sh Welcome1 ovm-mgr.local vmdb01 myPool repotarget 8c OVA (retention will be 8 copies) HotCloneVm.sh Welcome1 ovm-mgr.local vmdb01 myPool repotarget c8 FULL (retention will be 8 copies) ##########################################################################################
Schedule the regular backup of desired VMs using cron or install the Bacula Client in the same machine and configure a Client Run Before Job script to program the VMs recurrent execution.
After the HotCloneVm.sh execution, an NDMP backup from the NAS volume should be performed. If you don’t have the Enterprise Bacula NDMP plugin (which is faster and more reliable), a concurrent access to the NFS/iSCSI storage can be used to read VM Clones, remembering that concurrent iSCSI access is very dangerous and should be only performed in a read-only fashion.
References
[1] https://blogs.oracle.com/scoter/guest-hot-backup-ovm-34
Disponível em: Português (Portuguese (Brazil))EnglishEspañol (Spanish)