2 Replies Latest reply on May 12, 2014 11:53 PM by RSW-Orga

    ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP=0 but ghettoVCB tries backup powered vm which has snapshot

    aGap Lurker

      Hello!

       

      Strange situation:

      1. Latest ghettoVCB: ghettoVCB.sh, LAST_MODIFIED_DATE=2013_26_11, VERSION=2

      2. I want backup all vm's from esxi 5.5 free

      3. This esxi has one powered vm (other excluded) with snapshot

      4. Option ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP=0

      5. ghettoVCB detecting that vm has snapshot - writing "Snapshot found for ........., backup will not take place"

      6. ghettoVCB tries backup this vm - writing "Creating Snapshot ......for ......." !!!!

       

      Is this feature or bug?

      I checked script code and found need lines: 908 - 911.

      ....

      if ls "${VMX_DIR}" | grep -q "\-delta\.vmdk" > /dev/null 2>&1; then

                      if [ ${ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP} -eq 0 ]; then

                          logger "info" "Snapshot found for ${VM_NAME}, backup will not take place\n"

                          VM_FAILED=1

      ....

      But in my view - after line 911 var VM_FAILED not checked and we reach 988-991 - "${VMWARE_CMD} vmsvc/snapshot.create ...."

      As a result - problem with backup.

       

      Please help with advice.

        • 1. Re: ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP=0 but ghettoVCB tries backup powered vm which has snapshot
          johnmu Novice

          I also see the same problem, using the same version of ghettoVCB.sh. When ghettoVCB finds an existing snapshot it says it will skip the VM (because my ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP is 0, which is the default), but then goes ahead to attempt the backup. This freezes until I delete the snapshot using vSphere Client. At that point (10:00:48 in the example below) ghettoVCB continues and starts backing up the next VM in its list.

           

          2014-02-26 02:00:02 -- debug: HOST VERSION: VMware ESXi 4.1.0 build-381591

          2014-02-26 02:00:02 -- debug: HOST LEVEL: VMware ESXi 4.1.0 Update 1

          ...

          2014-02-26 02:00:02 -- info: CONFIG - VERSION = 2013_26_11_2

          ...

          2014-02-26 02:15:10 -- debug: Storage Information before backup:

          2014-02-26 02:15:10 -- debug: SRC_DATASTORE: datastore1

          2014-02-26 02:15:10 -- debug: SRC_DATASTORE_CAPACITY: 227.0 GB

          2014-02-26 02:15:11 -- debug: SRC_DATASTORE_FREE: 69.9 GB

          2014-02-26 02:15:11 -- debug: SRC_DATASTORE_BLOCKSIZE: 1

          2014-02-26 02:15:11 -- debug: SRC_DATASTORE_MAX_FILE_SIZE: 256 GB

          2014-02-26 02:15:11 -- debug:

          2014-02-26 02:15:11 -- debug: DST_DATASTORE: backupsNFS

          2014-02-26 02:15:11 -- debug: DST_DATASTORE_CAPACITY: 225.6 GB

          2014-02-26 02:15:11 -- debug: DST_DATASTORE_FREE: 61.2 GB

          2014-02-26 02:15:11 -- debug: DST_DATASTORE_BLOCKSIZE: NA

          2014-02-26 02:15:11 -- debug: DST_DATASTORE_MAX_FILE_SIZE: NA

          2014-02-26 02:15:11 -- debug:

          2014-02-26 02:15:11 -- info: Snapshot found for otrs, backup will not take place

           

          2014-02-26 02:15:11 -- debug: getVMDKs() - otrs-000001.vmdk###12:

          2014-02-26 02:15:11 -- info: Initiate backup for otrs

          2014-02-26 02:15:11 -- info: Creating Snapshot "ghettoVCB-snapshot-2014-02-26" for otrs

          2014-02-26 02:15:19 -- debug: Waiting for snapshot "ghettoVCB-snapshot-2014-02-26" to be created

          2014-02-26 02:15:19 -- debug: Snapshot timeout set to: 900 seconds

          2014-02-26 02:15:20 -- debug: findVMDK() - Searching for VMDK: "otrs-000001.vmdk" to backup

          2014-02-26 02:15:20 -- debug: /sbin/vmkfstools -i "/vmfs/volumes/datastore1/otrs/otrs-000001.vmdk" -a "" -d "thin" "/vmfs/volumes/backupsNFS/otrs/otrs-2014-02-26_02-00-01/otrs-000001.vmdk"

          Invalid adapter type: ''

           

          2014-02-26 02:15:20 -- info: ERROR: error in backing up of "/vmfs/volumes/datastore1/otrs/otrs-000001.vmdk" for otrs

          2014-02-26 02:18:33 -- info: Removing snapshot from otrs ...

          2014-02-26 10:00:48 -- debug: Removing /vmfs/volumes/backupsNFS/otrs/otrs-2014-02-25_02-00-01

          2014-02-26 10:00:48 -- info: Backup Duration: 465.62 Minutes

          2014-02-26 10:00:48 -- info: ERROR: Unable to backup otrs due to error in VMDK backup!

           

          This behaviour is worse than in the version of ghettoVCB before ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP was introduced. At least then it would cleanly skip the VM that had the snapshot and proceed to the next one.

           

          Logged in GitHub as https://github.com/lamw/ghettoVCB/issues/40

           

          Message was edited by: John Murray Added GitHub link

          • 2. Re: ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP=0 but ghettoVCB tries backup powered vm which has snapshot
            RSW-Orga Novice

            Hi,

             

            we just updated some of our Test-ESXis to 5.5 and with that we had to update to the same version of ghettoVCB.

            We ran into the same problem.

            The problem is that the script simply goes on to the backup-routine instead of jumping to the next VM.

            Just adding a continue in line 912 solved the problem for me.

            (Patch attached)

             

            Regards,

            Jörg