Amanda server is running FreeBSD, syntax bellow depend on FreeBSD.
# NFS for VMware backup nfs_server_enable="YES" nfs_server_flags="-u -t" rpcbind_enable="YES" rpc_lockd_enable="YES" rpc_statd_enable="YES"in /etc/exports; we will use the directory /virtual for temporary backup of VMware virtual machines:
/virtual -maproot=0:0 virtual1000.cs.ait.ac.th virtual2000.cs.ait.ac.th virtual3000.cs.ait.ac.th virtual4000.cs.ait.ac.th virtual5000.cs.ait.ac.thin /etc/hosts.allow (this may be overkill, IP depends on CSIM network):
# Rpcbind is used for all RPC services; protect your NFS! # (IP addresses rather than hostnames *MUST* be used here) rpcbind : 192.41.170.0/255.255.255.0 : allow rpcbind : 10.41.170.0/255.255.255.0 : allow rpcbind : ALL : deny # Rquota used by NFS rpc.rquotad: 192.41.170.0/255.255.255.0 : allow rpc.rquotad: 10.41.170.0/255.255.255.0 : allow rpc.rquotad: ALL : deny # Portmapper is used for all RPC services; protect your NFS! # (IP addresses rather than hostnames *MUST* be used here) portmap : 192.41.170.0/255.255.255.0 : allow portmap : 10.41.170.0/255.255.255.0 : allow portmap : ALL : deny
Cmnd_Alias AMANDA = /bin/rm amanda ALL=(root) NOPASSWD: AMANDA
Edit the script to reflect the list of ESXi servers.
define script vmware { plugin "vmware" execute-where server execute-on pre-dle-backup, post-dle-backup } define dumptype vmware { comment "Full dump of VMware virtual machine snapshot" auth "bsd" index yes compress server best estimate server priority high program "GNUTAR" allow-split true script "vmware" }and disklist (note that the DLE name depends on the name of the virtual machine, spaces in the name need to be properly escaped):
amanda /virtual/mybackups/Desktop\ Olivier vmware 1 diskghettoVCB adds the subdirectory mybackups in /virtual; that can be changed in the configuration of ghettoVCB.
POWER_VM_DOWN_BEFORE_BACKUP=1 ENABLE_HARD_POWER_OFF=1
vim-cmd hostsvc/datastore/nas_create mybackup 3 <mounted_directory> 0 amanda1000.cs.ait.ac.th
#"<DIRECTORY or .TGZ>;<DATASTORE_TO_RESTORE_TO>;<DISK_FORMAT_TO_RESTORE>" # DISK_FORMATS # 1 = zeroedthick # 2 = 2gbsparse # 3 = thin # 4 = eagerzeroedthick "/vmfs/volumes/oak1000/mybackups/DNS/DNS-2014-09-15_06-34-31;/vmfs/volumes/datas
/usr/local/ghettoVCB-restore.sh -c <configuration-file> [-d 2]The option -d 2 is for debug.
vim-cmd hostsvc/datastore/destroy mybackup