0 Replies Latest reply on Aug 31, 2016 12:25 PM by ghill

    ghettovcb not removing old backups

    ghill Lurker

      I'm running ghettovcb on a ESXi 6.0 host and my backup seems to be running just fine.  The script doesn't seem to be deleting my old backups even after the rotation setting has been met.   

       

      Here is my config for the backup:

       

      VM_BACKUP_VOLUME=/vmfs/volumes/backup

      DISK_BACKUP_FORMAT=thin

      VM_BACKUP_ROTATION_COUNT=3

      POWER_VM_DOWN_BEFORE_BACKUP=0

      ENABLE_HARD_POWER_OFF=0

      ITER_TO_WAIT_SHUTDOWN=4

      POWER_DOWN_TIMEOUT=5

      SNAPSHOT_TIMEOUT=15

      ENABLE_COMPRESSION=0

      VM_SNAPSHOT_MEMORY=0

      VM_SNAPSHOT_QUIESCE=0

      VMDK_FILES_TO_BACKUP="VM_DISK1.vmdk"

      EMAIL_LOG=0

       

      I have the job setup to run weekly.  Currently the VM_BACKUP_VOLUME directory has 7 different backups for the vmdk.  My rotation is 3 so there should only be 3 backups in the VM_BACKUP_VOLUME. 

       

      Here is the last log file from the most recent backup:

      2016-08-29 00:00:02 -- info: ============================== ghettoVCB LOG START ==============================

      2016-08-29 00:00:02 -- info: CONFIG - USING GLOBAL GHETTOVCB CONFIGURATION FILE = /etc/ghettovcb/backup.conf

      2016-08-29 00:00:02 -- info: CONFIG - VERSION = 2015_05_06_1

      2016-08-29 00:00:02 -- info: CONFIG - GHETTOVCB_PID = 12662833

      2016-08-29 00:00:02 -- info: CONFIG - VM_BACKUP_VOLUME = /vmfs/volumes/backup

      2016-08-29 00:00:02 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 3

      2016-08-29 00:00:02 -- info: CONFIG - VM_BACKUP_DIR_NAMING_CONVENTION = 2016-08-29_00-00-01

      2016-08-29 00:00:02 -- info: CONFIG - DISK_BACKUP_FORMAT = thin

      2016-08-29 00:00:02 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0

      2016-08-29 00:00:02 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0

      2016-08-29 00:00:02 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 4

      2016-08-29 00:00:02 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5

      2016-08-29 00:00:02 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15

      2016-08-29 00:00:02 -- info: CONFIG - LOG_LEVEL = info

      2016-08-29 00:00:02 -- info: CONFIG - BACKUP_LOG_OUTPUT = /tmp/ghettoVCB-2016-08-29_00-00-01-12662833.log

      2016-08-29 00:00:02 -- info: CONFIG - ENABLE_COMPRESSION = 0

      2016-08-29 00:00:02 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0

      2016-08-29 00:00:02 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0

      2016-08-29 00:00:02 -- info: CONFIG - ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP = 0

      2016-08-29 00:00:02 -- info: CONFIG - VMDK_FILES_TO_BACKUP = VM_DISK1.vmdk

      2016-08-29 00:00:02 -- info: CONFIG - VM_SHUTDOWN_ORDER =

      2016-08-29 00:00:02 -- info: CONFIG - VM_STARTUP_ORDER =

      2016-08-29 00:00:02 -- info: CONFIG - RSYNC_LINK = 0

      2016-08-29 00:00:02 -- info: CONFIG - EMAIL_LOG = 0

      2016-08-29 00:00:02 -- info: CONFIG - WORKDIR_DEBUG = 0

      2016-08-29 00:00:02 -- info:

      2016-08-29 00:00:05 -- info: Initiate backup for VM_Srv1

      2016-08-29 00:00:05 -- info: Creating Snapshot "ghettoVCB-snapshot-2016-08-29" for VM_Srv1

      2016-08-29 00:06:51 -- info: Removing snapshot from VM_Srv1 ...

      2016-08-29 00:06:51 -- info: Backup Duration: 6.77 Minutes

      2016-08-29 00:06:51 -- info: Successfully completed backup for VM_Srv1!

      2016-08-29 00:06:54 -- info: ###### Final status: All VMs backed up OK! ######

      2016-08-29 00:06:54 -- info: ============================== ghettoVCB LOG END ================================



      The log files show it "Removing snapshot" but there are still vmdk backups listed in the directory.   I looked inside each directory and the vmdk files exist in each backup. 

      Here's a listing of all the backups in the VM_BACKUP_VOLUME target.


      [root@vmh:/vmfs/volumes/backup] ls -la /vmfs/volumes/backup/VM_Srv1

      total 1088

      drwxr-xr-x    1 root     root          1260 Aug 29 00:00 .

      drwxr-xr-t    1 root     root          1680 Apr 18 13:29 ..

      drwxr-xr-x    1 root     root           840 Jul 18 00:05 VM_Srv1-2016-07-18_00-00-01

      drwxr-xr-x    1 root     root           840 Jul 25 00:05 VM_Srv1-2016-07-25_00-00-01

      drwxr-xr-x    1 root     root           840 Aug  1 00:05 VM_Srv1-2016-08-01_00-00-01

      drwxr-xr-x    1 root     root           840 Aug  8 13:56 VM_Srv1-2016-08-08_13-51-00

      drwxr-xr-x    1 root     root           840 Aug 15 00:06 VM_Srv1-2016-08-15_00-00-01

      drwxr-xr-x    1 root     root           840 Aug 22 00:06 VM_Srv1-2016-08-22_00-00-01

      drwxr-xr-x    1 root     root           840 Aug 29 00:06 VM_Srv1-2016-08-29_00-00-01

       

       

      Any help would be appreciated.