用ghettoVCB现实ESXI5.1的虚拟机自动备份

时间:2023-01-30 00:43:38

终于成功测试完毕。

未启用NFS和EMAIL

相关文件内容如下:

~ # cat /var/spool/cron/crontabs/root 
#min hour day mon dow command
1 1 * * * /sbin/tmpwatch.py
1 * * * * /sbin/auto-backup.sh
0 * * * * /usr/lib/vmware/vmksummary/log-heartbeat.py
*/5 * * * * /sbin/hostd-probe
0 15 * * sun /ghettoVCB-master/ghettoVCB.sh -f /ghettoVCB-master/M_vms_to_backup -g /ghettoVCB-master/ghettoVCB-M.conf > /dev/null
0 15 * * sat /ghettoVCB-master/ghettoVCB.sh -f /ghettoVCB-master/S_vms_to_backup -g /ghettoVCB-master/ghettoVCB-S.conf > /dev/null
/ghettoVCB-master # cat S_vms_to_backup 
S_GuesOS
/ghettoVCB-master # cat ghettoVCB-S.conf 
VM_BACKUP_VOLUME
=/vmfs/volumes/MD1200A/S-Back
DISK_BACKUP_FORMAT
=thin
VM_BACKUP_ROTATION_COUNT
=2
POWER_VM_DOWN_BEFORE_BACKUP
=0
ENABLE_HARD_POWER_OFF
=0
ITER_TO_WAIT_SHUTDOWN
=3
POWER_DOWN_TIMEOUT
=5
ENABLE_COMPRESSION
=0
VM_SNAPSHOT_MEMORY
=0
VM_SNAPSHOT_QUIESCE
=0

ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP
=0
ENABLE_NON_PERSISTENT_NFS
=0
UNMOUNT_NFS
=0
NFS_SERVER
=172.30.0.195
NFS_MOUNT
=/nfsshare
NFS_LOCAL_NAME
=nfs_storage_backup
NFS_VM_BACKUP_DIR
=mybackups
SNAPSHOT_TIMEOUT
=15
EMAIL_LOG
=0
EMAIL_SERVER
=auroa.primp-industries.com
EMAIL_SERVER_PORT
=25
EMAIL_DELAY_INTERVAL
=1
EMAIL_TO
=auroa@primp-industries.com
EMAIL_FROM
=root@ghettoVCB
WORKDIR_DEBUG
=0
VM_SHUTDOWN_ORDER
=
VM_STARTUP_ORDER
=

用ghettoVCB现实ESXI5.1的虚拟机自动备份