I’m just getting Vertical Backup going, but thought this would be helpful.
-
Create cron-update.sh in Vertical Backup Dir:
#!/bin/ash vms=`vim-cmd vmsvc/getallvms | grep "^[0-9]" | while read vmid therest; do vim-cmd vmsvc/get.summary $vmid | egrep "name" | sed 's/.*= \"//' | sed 's/,//' | sed 's/\" *$//' | awk '{printf("%s", $0)}'; echo; done` ./vertical cron --threads <threads> --email <set time> $vms
-
Add execute perms to script:
chmod u+x cron-update.sh
-
Edit
/var/spool/cron/crontabs/root
-
Add the full path to the script above to your cron and set it to run ~10 minutes before you want vertical backup to run.
-
Restart cron:
kill $(cat /var/run/crond.pid) && /usr/lib/vmware/busybox/bin/busybox crond
The script will get a list of all VMs and re-run the cron creator in Vertical Backup to update the cron job.