Hello.
i'am doing vmbk.pl snapshot backup over nfs trough nfs mapped disk (/vmfs/volumes/nfs02/)the scripts run fine when running manual but when executing in the cron the scripts ends with the message no scsi disk found , see the log attached.
on stderror i can see the following error just before the error occurs.
-
Check space on destination directory:
Use of uninitialized value in numeric lt (<) at /usr/local/bin/vmbk.pl line 3693.
-
iam not very familiar with perl but it seems the code try to use an unititialized value.
why is the value not initialized when ran from cron?
im running vmbk.pl 3.0 rev11 on esx 3.02
Thanks
-
the cron script used
-
#!/bin/bash
00 22 * * mon root /usr/local/bin/vmbk.pl -C /usr/local/bin/vmbk-default.conf -a >/dev/null 2>&1
-
/var/log/vmbk.log
-
Process started on HOST esx01
Date : 04:08:2008
Time : 22:00:02
Send Report by Email :
SMTP Host : 89.2.5.53
From : esx@localhost
To : root@localhost
Encode : base64
Type : HTML
Connection to Server local
Enumerating Guest on Server local
Check space on destination directory:
125000 MByte Free
Start Time : 22:0:5
################################################################################
Virtual Machine Name : nsilitw2k03
################################################################################
Power Status Powered On - Running
Connecting to Guest with config file
/vmfs/volumes/46e1eb50-cf6d93af-6ead-001a64324b24/nsilitw2k03/nsilitw2k03.vmx
Erase files in /vmfs/volumes/NFS02/nsilitw2k03/
Enumerating SCSI Disk
Check space for the SNAPSHOT:
/vmfs/volumes/SAN_DataStore_01
72G Free
Test guest's status
Create a snapshot
Check space on destination directory:
125000 MByte Free
VMDisk scsi0:0 : nsilitw2k03.vmdk
Starting backup on directory
/vmfs/volumes/NFS02/nsilitw2k03/
using /usr/sbin/vmkfstools -d thin
Status Backup
Test guest's status
Remove snapshots
Copy Configuration file
Backup Result = 0
Close guest connection
End time : 22:2:10 (125s)
Start Time : 22:2:11
################################################################################
Virtual Machine Name : nsilas2k310
################################################################################
Power Status Powered On - Running
Connecting to Guest with config file
/vmfs/volumes/46e1eb50-cf6d93af-6ead-001a64324b24/nsilas2k310/nsilas2k310.vmx
Erase files in /vmfs/volumes/NFS02/nsilas2k310/
Enumerating SCSI Disk
Check space for the SNAPSHOT:
/vmfs/volumes/SAN_DataStore_01
72G Free
Test guest's status
Create a snapshot
Check space on destination directory:
125000 MByte Free
VMDisk scsi0:1 : nsilas2k310_1.vmdk
Starting backup on directory
/vmfs/volumes/NFS02/nsilas2k310/
using /usr/sbin/vmkfstools -d thin
Status Backup
Test guest's status
VMDisk scsi0:0 : nsilas2k310.vmdk
Starting backup on directory
/vmfs/volumes/NFS02/nsilas2k310/
using /usr/sbin/vmkfstools -d thin
Status Backup
Test guest's status
Remove snapshots
Copy Configuration file
Backup Result = 0
Close guest connection
End time : 22:7:41 (330s)
Start Time : 22:7:43
################################################################################
Virtual Machine Name : nsivmlin01_nagios
################################################################################
Power Status Powered On - Running
Connecting to Guest with config file
/vmfs/volumes/46e1eb50-cf6d93af-6ead-001a64324b24/nsivmlin01_nagios/nsivmlin01_nagios.vmx
Erase files in /vmfs/volumes/NFS02/nsivmlin01_nagios/
Enumerating SCSI Disk
Check space for the SNAPSHOT:
/vmfs/volumes/SAN_DataStore_01
72G Free
Test guest's status
Create a snapshot
Check space on destination directory:
125000 MByte Free
VMDisk scsi0:0 : nsivmlin01_nagios.vmdk
Starting backup on directory
/vmfs/volumes/NFS02/nsivmlin01_nagios/
using /usr/sbin/vmkfstools -d thin
Status Backup
Test guest's status
Remove snapshots
Copy Configuration file
Backup Result = 0
Close guest connection
End time : 22:10:8 (146s)
Start Time : 22:10:9
################################################################################
Virtual Machine Name : nsilasw2k07
################################################################################
Power Status Powered On - Running
Connecting to Guest with config file
/vmfs/volumes/46e1eb50-cf6d93af-6ead-001a64324b24/nsilasw2k07/nsilasw2k07.vmx
Erase files in /vmfs/volumes/NFS02/nsilasw2k07/
Enumerating SCSI Disk
Check space for the SNAPSHOT:
/vmfs/volumes/SAN_DataStore_01
72G Free
Test guest's status
Create a snapshot
Check space on destination directory:
125000 MByte Free
VMDisk scsi0:0 : nsilasw2k07.vmdk
Starting backup on directory
/vmfs/volumes/NFS02/nsilasw2k07/
using /usr/sbin/vmkfstools -d thin
Status Backup
Test guest's status
Remove snapshots
Copy Configuration file
Backup Result = 0
Close guest connection
End time : 22:16:29 (381s)
Start Time : 22:16:30
################################################################################
Virtual Machine Name : nsilasw2k05
################################################################################
Power Status Powered On - Running
Connecting to Guest with config file
/vmfs/volumes/46e1eb50-cf6d93af-6ead-001a64324b24/nsilasw2k05/nsilasw2k05.vmx
Erase files in /vmfs/volumes/NFS02/nsilasw2k05/[FAIL]
rror deleting files in /vmfs/volumes/NFS02/nsilasw2k05/ ****************************************************
No SCSI Disk found **
Skip backup **
****************************************************
Couldn't close file properly[FAIL]
Copy Configuration file
-
vmbk-default.conf
-
#Version 1.01.2
#set timeout
Timeout=60000
#minimum space required for add RedoLOG
minspaceforRedo=1024
backup esx host configuration
backupESX=false
BackupSession="sunday"
#directory where file
destination=/vmfs/volumes/NFS02/
#minimum space required for backup
minspace=1024
#minimum space required for add RedoLOG
minspaceforRedo=1000
#vmbk do not create subdirectory
FlatDir=false
#Create a restore shell script
Restore=true
Backup configuration file and CMOS
BackupVMX=true
the exported virtual disk contains the redo log if exist
BackREDO=false
#disk format VMDK or DSK
DiskFormat=VMDK
#Backup all Guest
BackupAllGuest=true
#format of log HTML or TEXT
LogFormat=TEXT
#log file an directory with number of day in file name
logfile=/var/log/vmbk.log
#use cp command to disk instead of vmkfstools
usecp=false
#use vmkfstool(raw mode more faster than cp. !!!!caution with smb share!!!!) command to disk instead of cp
vmkfstoolsrawmode=true
#create a tar.gz file one for each disk inside a unique guest directory
usetar=false
#create a tar.gz one for each vm guest with inside all owned file
usetaronefile=false
#create a zip for each vm guest
usegzip=false
#tardir=/tmp not more used
true or false
email=true
smtpserver=89.2.5.53
to=root@localhost
from=esx@localhost
encode=base64
html=true
Force dismount before a mount operation
forcedismount=false
Mount a nfs volume
nfs=false
nfsmount=89.2.17.101:/public/san_backup
nfsmountpoint=/mnt/nfs
nfsoptions="soft"
mount a samba volume
smb=false
smbserver=//smbserver/share
smbuser=domain
user
smbpasswd=password
smbmountpoint=/vmbk
#smboptions=%none%
true or false
ftp=false
ftpserver=server
ftpdir="/"
ftpuser=user
ftppasswd=password
true or false
ftppassive=false
#ftptimeout value expressed in sec
ftptimeout=20
predirname=%none%
predirname=%hostname%
predirname=%date%
predirname=%time%
-N file create a list of backup files
Create a list of file to backup
backupdisklist=false
backupdisklistfile=/tmp/vmbklist
only do add redo (without redo commit)
onlyaddredo=false
only do redo commit (without add redo)
onlyredocommit=false
runonstart=false
runonstartfile=""
runonstop=false
runonstopfile=""
#Veritas Netbackup Options
netbackup=false
netbackuppolicy="vmware"
netbackupclientname=%hostname%
netbackuplog="/var/log/vmbk_netbackup.log"
netbackupprepost=false
netbackupmaster="masterserver"
#Networker Legato Options
networker=false
networkerserver="server"
networkergroup="vmware"
networkerclientname=%hostname%
networkerlog="/var/log/vmbk_networker.log"
networkerpool="pool"
#tivoli options
tsm=false
tsmstanza="stnza"
tsmtype="archive"
tsmarchmc="management classes"
Use temporary dir
temp=false
tempdir="/tmp"
#use syslog
syslog=false
facility="local6"
level="info"