User Tools

Site Tools


sesipod:linux:esxi:vmback-example
export SESI_SOURCE0="/vmfs/volumes/60-SSD"
export SESI_SOURCE1="/vmfs/volumes/SSD0"
export SESI_DEST="/vmfs/volumes/SSD1"
#-----------------------------------------#
mkdir "$SESI_DEST"/`date +%b-%d-%Y_%H`
mkdir "$SESI_DEST"/`date +%b-%d-%Y_%H`/PFsense/
mkdir "$SESI_DEST"/`date +%b-%d-%Y_%H`/ESXI__BACKUP/
mkdir "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-WWW/
mkdir "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-TS3/
mkdir "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-Plex/
mkdir "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-The1.7.10Pack/
#-----------------------------------------#
vim-cmd vmsvc/snapshot.removeall 135
vim-cmd vmsvc/snapshot.removeall 159
vim-cmd vmsvc/snapshot.removeall 160
vim-cmd vmsvc/snapshot.removeall 161
vim-cmd vmsvc/snapshot.removeall 162
vim-cmd vmsvc/snapshot.removeall 163
#-----------------------------------------#
vim-cmd vmsvc/snapshot.create 135 BackupINPROG
vim-cmd vmsvc/snapshot.create 159 BackupINPROG
vim-cmd vmsvc/snapshot.create 160 BackupINPROG
vim-cmd vmsvc/snapshot.create 161 BackupINPROG
vim-cmd vmsvc/snapshot.create 162 BackupINPROG
vim-cmd vmsvc/snapshot.create 163 BackupINPROG
#-----------------------------------------#
vmkfstools -i "$SESI_SOURCE0"/PFsense/PFsense.vmdk "$SESI_DEST"/`date +%b-%d-%Y_%H`/PFsense/PFsense.vmdk -d thin
vmkfstools -i "$SESI_SOURCE0"/ESXI__BACKUP/ESXI__BACKUP.vmdk "$SESI_DEST"/`date +%b-%d-%Y_%H`/ESXI__BACKUP/ESXI__BACKUP.vmdk -d thin
vmkfstools -i "$SESI_SOURCE1"/Debian-WWW/Debian-WWW.vmdk "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-WWW/Debian-WWW.vmdk -d thin
vmkfstools -i "$SESI_SOURCE1"/Debian-TS3/Debian-TS3.vmdk "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-TS3/Debian-TS3.vmdk -d thin
vmkfstools -i "$SESI_SOURCE1"/Debian-Plex/Debian-Plex.vmdk "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-Plex/Debian-Plex.vmdk -d thin
vmkfstools -i "$SESI_SOURCE1"/Debian-The1.7.10Pack/Debian-The1.7.10Pack.vmdk "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-The1.7.10Pack/Debian-The1.7.10Pack.vmdk -d thin
#-----------------------------------------#
vim-cmd vmsvc/snapshot.removeall 135
vim-cmd vmsvc/snapshot.removeall 159
vim-cmd vmsvc/snapshot.removeall 160
vim-cmd vmsvc/snapshot.removeall 161
vim-cmd vmsvc/snapshot.removeall 162
vim-cmd vmsvc/snapshot.removeall 163
#-----------------------------------------#
cp "$SESI_SOURCE0"/PFsense/PFsense.vmx "$SESI_DEST"/`date +%b-%d-%Y_%H`/PFsense/PFsense.vmx
cp "$SESI_SOURCE0"/ESXI__BACKUP/ESXI__BACKUP.vmx "$SESI_DEST"/`date +%b-%d-%Y_%H`/ESXI__BACKUP/ESXI__BACKUP.vmx
cp "$SESI_SOURCE1"/Debian-WWW/Debian-WWW.vmx "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-WWW/Debian-WWW.vmx
cp "$SESI_SOURCE1"/Debian-TS3/Debian-TS3.vmx "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-TS3/Debian-TS3.vmx
cp "$SESI_SOURCE1"/Debian-Plex/Debian-Plex.vmx "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-Plex/Debian-Plex.vmx
cp "$SESI_SOURCE1"/Debian-The1.7.10Pack/Debian-The1.7.10Pack.vmx "$SESI_DEST"/`date +%b-%d-%Y_%H`/Debian-The1.7.10Pack/Debian-The1.7.10Pack.vmx
#-----------------------------------------#
find "$SESI_DEST"/* -mtime +5 -type d | xargs rm -f -r
sesipod/linux/esxi/vmback-example.txt · Last modified: 2020/10/02 11:16 (external edit)