User Tools

Site Tools


sesipod:linux:esxi:vmbckupmine
export SESI_SOURCE="/vmfs/volumes/SSD0"
export SESI_DEST="/vmfs/volumes/Backup-FAST-SSD1/VMS-TEMP/"

wait 5

mkdir “$SESI_DEST”`date +%b%d%Y`

vim-cmd vmsvc/snapshot.removeall 1
vim-cmd vmsvc/snapshot.removeall 2
vim-cmd vmsvc/snapshot.removeall 3

wait 5

mkdir "$SESI_DEST"/`date +%b%d%Y`/VM1/
mkdir "$SESI_DEST"/`date +%b%d%Y`/VM2/
mkdir "$SESI_DEST"/`date +%b%d%Y`/VM3/

wait 5

vim-cmd vmsvc/snapshot.create 1 BackupINPROG
vim-cmd vmsvc/snapshot.create 2 BackupINPROG
vim-cmd vmsvc/snapshot.create 3 BackupINPROG

wait 5

vmkfstools -i "$SESI_SOURCE"/VM1/VM1.vmdk "$SESI_DEST"/`date +%b%d%Y`/VM1/VM1.vmdk -d thin
vmkfstools -i "$SESI_SOURCE"/VM2/VM2.vmdk "$SESI_DEST"/`date +%b%d%Y`/VM2/VM2.vmdk -d thin
vmkfstools -i "$SESI_SOURCE"/VM3/VM3.vmdk "$SESI_DEST"/`date +%b%d%Y`/VM3/VM3.vmdk -d thin

wait 5

vim-cmd vmsvc/snapshot.removeall 1
vim-cmd vmsvc/snapshot.removeall 2
vim-cmd vmsvc/snapshot.removeall 3

wait 5

cp "$SESI_SOURCE"/VM1/VM1.vmx "$SESI_DEST"/`date +%b%d%Y`/VM1/VM1.vmx
cp "$SESI_SOURCE"/VM2/VM2.vmx "$SESI_DEST"/`date +%b%d%Y`/VM2/VM2.vmx
cp "$SESI_SOURCE"/VM3/VM3.vmx "$SESI_DEST"/`date +%b%d%Y`/VM3/VM3.vmx

wait 5

export SESI_DISKMOVE="/vmfs/volumes/Backup/VMS-PERM-temp/"
mv "$SESI_DEST"/* "$SESI_DISKMOVE"/
sesipod/linux/esxi/vmbckupmine.txt · Last modified: 2020/10/02 11:16 (external edit)