4 Replies Latest reply on Oct 7, 2014 9:03 PM by sguk

    Error (failed to locate and extract VM_ID) but only when run by cron

    ephemeros Lurker

      I have an ESXi 4.1.0 server that has been backing up just fine with ghettoVCB for a long time, but it has suddenly stopped working. The strange thing is, it only fails when it is executed on schedule by cron. Nothing has really changed on this host other than one server being removed, which I also removed from my input file. When executed by cron, I get the following output:

       

      2014-03-09 04:00:02 -- info: ERROR: failed to locate and extract VM_ID for MSDB4!

       

       

      2014-03-09 04:00:02 -- info: ERROR: failed to locate and extract VM_ID for MailServer1!

       

       

      2014-03-09 04:00:02 -- info: ERROR: failed to locate and extract VM_ID for MSDB2!

       

       

      2014-03-09 04:00:02 -- info: ERROR: failed to locate and extract VM_ID for Web10!

       

       

      2014-03-09 04:00:02 -- info: ERROR: failed to locate and extract VM_ID for Nagios!

       

       

      2014-03-09 04:00:02 -- info: ###### Final status: ERROR: All VMs failed! ######

       

      When I execute the script by hand, it works perfectly. Our cron job runs a script with the options in it like so:

       

      ./backup.sh -f vms_to_backup -l ./logs/backup_$(date +%Y%m%d).log

       

      I am executing this same shell script manually when it works. Any ideas?