This is an old revision of the document!
Download latest files from github: https://github.com/lamw/ghettoVCB Put the files on a datastore. I use datastore backup (/vmfs/volumes/backup), which is an NFS mount. I have put the original scripts in /vmfs/volumes/backup/bin. I have create my own cron script to put the backup files in the necessary directories.
#!/bin/sh BACKUPDIR=/vmfs/volumes/backup BINDIR=$BACKUPDIR/bin CONFDIR=$BACKUPDIR/conf LOGDIR=$BACKUPDIR/log DATE=$(date +%d-%m-%Y-%H-%M) HOSTNAME=$(hostname) case $(hostname -d) in mngt.bh.helux.nl) DOMAIN=bh ;; mngt.rtd.helux.nl) DOMAIN=rtd ;; mngt.ams.helux.nl) DOMAIN=ams ;; *) DOMAIN=unknown ;; esac $BINDIR/ghettoVCB.sh -a -g $CONFDIR/ghettoVCB-$DOMAIN.conf -l $LOGDIR/$HOSTNAME-$DATE.log >/dev/null 2>&1 exit 0
Add the following on each ESXi hypervisor. The notation of the crontab is as follows:
#min hour day mon dow command
using the following config it means. run on 1:00 on sunday (day 0)
. . /bin/kill $(cat /var/run/crond.pid) /bin/echo "0 1 * * 0 /vmfs/volumes/backup/cron-ghettoVCB.sh" >> /var/spool/cron/crontabs/root crond exit 0