vmbk.pl Version 2.16 by Massimiliano Daneri email: m.daneri@evoluzione.com email: manzi@vmts.net NAME vmbk.pl - VMware ESX Server copy disk utility SYNOPSIS vmbk.pl OPTIONS USAGE vmbk.pl -h | [-l] [-a] [-t] [-i] [-0][-1][-2][-3][-4][-c][-7][-m] [ -n nfs | [-s smb | -f ftp -r remotedir ] -u user -p paswd ] COPYRIGHT VMware ESX Server is Copyright 2000 VMware, Inc. All rights reserved. DESCRIPTION vmbk.pl is a script for creating ESX disk snapshot. It supports disk copy to local host disk or remote Disk with NFS / SMB vmbk can be used on guest powered or on guest unpowered. vmbk support batch and interactive use. vmbk search about 'backup' option on vm guest definition file ,the option may have 3 value NONE,MANUAL,AUTO, if NONE no backup is possible, if MANUAL is possible only interactive mode (-i option) , if AUTO backup is always done. If backup isn't finding, it's equivalent to AUTO. You can choose also to set SCSIx:y.BACKUP for permit or not a single disk backup, the value are the same NONE,MANUAL,AUTO OPTIONS The long and short forms of options, shown here listed together, are equivalent. -h Help about parameters -n don't display start info -d directory Exports the disk contents of the specified guest OS on the specified directory local or remote, to a VMware Workstation format virtual disk. The virtual disk may then be transferred to another machine and imported to a SCSI device on the remote machine. The virtual disk will likely take less space then the full size of the VMFS file, since the virtual disk does not include zeroed sectors of the disk image. When this option is used on a guest powered on an ESX Server REDO log is created, when the exported virtual disk is done the REDO log is commit to its base disk. REMEMBER FINAL / on directory -n host:export Mount NFS host's export on directory specified by -d parameter -s //host/share Mount SMB host's share on directory specified by -d parameter, need -u and -p options to work -u username Samba user for SMB mount -p password Samba password for SMB mount -l Log mode Don’t use color in output ideal for redirection -t Test mode Don’t create export file, but done all loop -i Interactive mode Shows a menu where you may choose what guest do you want export -a Backup all vm Override default setting backup only started vm. -f ftp address ftp server export to ftp server -7 FTP passive mode -r directory ftp remote start directory -1 use vmdk format for export Export disk file with vmdk extension -2 debug mode -3 do backup of redo disk file When start do a REDO.REDO file and backup DSK + REDO file -4 backup configuration file (.VMX) and CMOS -c create restore command on export directory, simply execute the script file on destination directory -m export disk in flat mode EXAMPLES vmbk.pl -d /export/ Backup vm started to /export/ directory vmbk.pl -d /export/ -a -1 Backup ALL vm to /export/ directory with vmdk extension vmbk.pl -d /export/ -i Show menu where you may chose which guest backup vmbk.pl -d /tmp/ -f ftpdemo -r /vmbackup/ -u test -p password Backup VM to ftpdemo with ftp protocol, using /tmp/ directory for temporary file vmbk.pl -d /export/ -n srvnfs:/exp -a Backup ALL vm to exp on server 'srvnfs' vmbk.pl -d /export/ -l >logfile Backup all vm started to /export/ directory and send output to log file 'logfile' sample file for cron scheduling, with log file mountpoint=/export/archive/ arg2=/var/log/vmbk.log nfsmount=lnxrh02:/vol/d1 /usr/local/bin/vmbk.pl -d $mountpoint -n $nfsmount -l > $arg2