ghettoVCB.sh 介紹
ghettoVCB.sh 此腳本主要是針對 VMWare ESXi 備份、還原使用。目前能使用的版本有ESX(i)3.5/4.x/5.x,使用的方法類似VMware的VCB的工具執行備份。ghettoVCB.sh的工作流程大致為,執行虛擬機的快照,然後進行備份,當備份完成後會刪除快照。而此腳本最大的特色為可在虛擬機在線時備份,而不用停機備份。
詳細內容可參考 VMware官網
ghettoVCB.sh設定
一、前置作業
開啟SSH
1. 開啟SSH
[Configuration] → [Security Profile] → [Properties]
2. [SSH] → [Options] → [Start]
放置ghettoVCB檔案
在放置ghettoVCB檔案的部份可分為兩種方式,選一種來用就行了。
方式一 :
上傳檔案
1. 下載 ghettoVCB
官方載點 :
lamw-ghettoVCB-0410796
Download as zip 、 Download as tar.gz
ghettoVCB-master(新版本支援到 ESXi5.5 )
本站載點 :
lamw-ghettoVCB-0410796
Download as zip 、 Download as tar.gz
ghettoVCB-master(新版本支援到 ESXi5.5 )
在下載 ghettoVCB 檔案的部份會有兩個選項 [Download as zip] 和 [Download as tar.gz]。兩個檔案內容都一樣。所以可自行選擇要那一種方式。
在這邊選擇 [Download as tar.gz]的方式下載
2. 上傳lamw-ghettoVCB-518cef7.tar.gz
把剛剛下載好的lamw-ghettoVCB-518cef7.tar.gz上傳到ESXi Server。
使用VMware vSphere Client上傳
[Configuration] → [Storage] → [datastore1] → [Browse Datastore]
3. 選擇檔案要存放的路徑,然後點,選Upload File
4. 上傳完成後,會看到剛上傳好的lamw-ghettoVCB-518cef7.tar.gz,如果沒出線的話可按一下
方式二 :
下載檔案
1. 使用 SSH 登入ESXi Server
2. 下載檔案
1 2 3 4 5 |
~ # cd /vmfs/volumes/datastore1 ~ # wget http://download.faq-book.com/download/System/VMware/ghettoVCB /lamw-ghettoVCB-518cef7.tar.gz Connecting to download.faq-book.com (61.66.28.156:80) lamw-ghettoVCB-518ce 100% |***********************************| 15425 0:00:00 ETA |
3. 查看檔案
查看檔案會看到已下載完成的lamw-ghettoVCB-518cef7.tar.gz
1 2 3 |
~ # ls ISO VM1 VM2 VM3 lamw-ghettoVCB-518cef7.tar.gz |
二、 ghettoVCB.sh安裝與設定
在開始安裝之前有一點要注意一下
由於ESXi重開機之後會把某些資料刪除,因此會建議把此檔留在datastore1此硬碟空間內,才不會因重開機後檔案就被刪除了。
[Note]
因5.1版為最新版本,而 ghettoVCB 尚未更新至最新板。如果是使用VMware ESXi 5.1版的,在 ghettoVCB.sh 以下有個地方要修改。要不然在使用上會出現版本序號有問題。
[Note]
若是下載 ghettoVCB-master 版本的無需修改以下配置
大約在第231行會看到以下程式碼,請加入 || [[ "${ESX_VERSION}" == "5.1.0" ]]。多加上5.1版本的判斷。
這邊有修改好的 ghettoVCB.sh
1 2 3 4 5 6 7 8 9 10 |
~ # vi ghettoVCB.sh # 修改前 230 ESX_VERSION=$(vmware -v | awk '{print $3}') 231 if [[ "${ESX_VERSION}" == "5.0.0" ]]; then 232 VER=5 # 修改後 230 ESX_VERSION=$(vmware -v | awk '{print $3}') 231 if [[ "${ESX_VERSION}" == "5.0.0" ]] || [[ "${ESX_VERSION}" == "5.1.0" ]]; then 232 VER=5 |
修改前
修改後
1. 安裝
基本上datastore1的路徑為 /vmfs/volumes/datastore1
解tar後會看到ghettoVCB.sh,此腳本正是所需要的
1 2 3 4 5 6 7 |
~ # cd /vmfs/volumes/datastore1 ~ # tar -zxvf lamw-ghettoVCB-518cef7.tar.gz ~ # cd lamw-ghettoVCB-518cef7 ~ # ls README ghettoVCB-restore.sh ghettoVCB-vm_backup_configuration_template ghettoVCB.conf ghettoVCB-restore_vm_restore_configuration_template ghettoVCB.sh |
2. 相關設定檔參數說明
2.1 ghettoVCB.sh 設定檔
說明 ghettoVCB.sh 設定檔內常用的設定
這邊有修改好的 ghettoVCB.sh 設定檔,提供下載參考
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
~ # vi ghettoVCB.sh # Author: William Lam # Created Date: 11/17/2008 # http://www.virtuallyghetto.com/ # http://communities.vmware.com/docs/DOC-8760 ################################################################## # directory that all VM backups should go (e.g. /vmfs/volumes/SAN_LUN1/mybackupdir) # 設定備份後的儲存位置,可自行修改儲存位置。 VM_BACKUP_VOLUME=/vmfs/volumes/dlgCore-NFS-bigboi.VM-Backups/WILLIAM_BACKUPS # Format output of VMDK backup # zeroedthick # 2gbsparse # thin # eagerzeroedthick # 定義備份的硬碟格式,想了解硬碟格式說明請參考「VMware vSphere(ESXi) 虛擬硬碟格式介紹」 DISK_BACKUP_FORMAT=thin # Number of backups for a given VM before deleting # 定義備份保留的數量 VM_BACKUP_ROTATION_COUNT=3 # Shutdown guestOS prior to running backups and power them back on afterwards # This feature assumes VMware Tools are installed, else they will not power down and loop forever # 1=on, 0 =off # 虛擬機POWER OFF時不會要求snapshotting (enable=1,disable=0) POWER_VM_DOWN_BEFORE_BACKUP=0 # enable shutdown code 1=on, 0 = off # 定義沒有安裝VMware Tools的虛擬機是否可以在硬碟POWER OFF時啟用"POWER_VM_DOWN_BEFORE_BACKUP" ENABLE_HARD_POWER_OFF=0 # if the above flag "ENABLE_HARD_POWER_OFF "is set to 1, then will look at this flag which is the # of iterations # the script will wait before executing a hard power off, this will be a multiple of 60seconds # (e.g) = 3, which means this will wait up to 180seconds (3min) before it just powers off the VM # 如果啟用"ENABLE_HARD_POWER_OFF"此定義執行強制關閉時會倒數運算,單位3為3分鐘180秒 ITER_TO_WAIT_SHUTDOWN=3 # Number of iterations the script will wait before giving up on powering down the VM and ignoring it for backup # this will be a multiple of 60 (e.g) = 5, which means this will wait up to 300secs (5min) before it gives up # 設定POWER DOWN的時間。等待關閉時VM會放棄或忽略特定的VM備份。單位5為5分鐘300秒 POWER_DOWN_TIMEOUT=5 # enable compression with gzip+tar 1=on, 0=off # 備份是否啟用壓縮 (enable=1,disable=0) ENABLE_COMPRESSION=0 ############################ ####### NEW PARAMS ######### ############################ # Include VMs memory when taking snapshot # 是否啟用 VM 虛擬機的快照記憶體 (enable=1,disable=0) VM_SNAPSHOT_MEMORY=0 # Quiesce VM when taking snapshot (requires VMware Tools to be installed) # 是否啟用對停止的 VM 虛擬機使用快照 (需有安裝 VMware Tools) VM_SNAPSHOT_QUIESCE=0 ########################################################## # NON-PERSISTENT NFS-BACKUP ONLY # # ENABLE NON PERSISTENT NFS BACKUP 1=on, 0=off # 接下來為NFS的相關設定 # 以下是給不想讓NFS與系統長期連接的設定。允許只在備份的過程中連接到NFS, 並使用到以下6個變數。 #定義非持久性的NFS備份 ENABLE_NON_PERSISTENT_NFS=0 # umount NFS datastore after backup is complete 1=yes, 0=no # 是否要卸載NFS(yes=1,no=0) UNMOUNT_NFS=0 # IP Address of NFS Server # NFS Server 的地址(ip或主機名) NFS_SERVER=172.51.0.192 # Path of exported folder residing on NFS Server (e.g. /some/mount/point ) # NFS 存放檔案的路徑 NFS_MOUNT=/upload # Non-persistent NFS datastore display name of choice # NFS 資料存放地方的名稱 NFS_LOCAL_NAME=backup # Name of backup directory for VMs residing on the NFS volume # 虛擬機上NFS備份的目錄 NFS_VM_BACKUP_DIR=mybackups ############################ ######### EMAIL ############ ############################ # 以下是MAIL 發送LOG的設定 # Email debug 1=yes, 0=no # 是否發送debug的LOG,這是做為測試使用 EMAIL_DEBUG=0 # Email log 1=yes, 0=no # 是否要透過電子郵件來發送備份LOG (yes=1,no=0) EMAIL_LOG=0 # Email Delay Interval from NC (netcat) - default 1 # 設定每封mail之間發送的延遲時間。 EMAIL_DELAY_INTERVAL=1 # Email SMTP server # Email 的SMTP server的ip或網址 EMAIL_SERVER=auroa.primp-industries.com # Email SMTP server port # 設定mail 所使用的port EMAIL_SERVER_PORT=25 # Email FROM # 寄件人的mail EMAIL_FROM=root@ghettoVCB # Email RCPT # 收件人的mail EMAIL_TO=auroa@primp-industries.com ########################## DO NOT MODIFY PAST THIS LINE ########################## # RSYNC LINK 1=yes, 0 = no RSYNC_LINK=0 LOG_LEVEL="info" VMDK_FILES_TO_BACKUP="all" # default 15min timeout # 設定等待VM快照的時間,在等待關閉時會放棄和忽略特定備份的VM SNAPSHOT_TIMEOUT=15 LAST_MODIFIED_DATE=2011_11_19 VERSION=1 VERSION_STRING=${LAST_MODIFIED_DATE}_${VERSION} # Directory naming convention for backup rotations (please ensure there are no spaces!) VM_BACKUP_DIR_NAMING_CONVENTION="$(date +%F_%H-%M-%S)" |
2.2 ghettoVCB.sh 參數使用說明
以下是ghettoVCB.sh相關參數的使用說明
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
~ # ./ghettoVCB.sh Logging output to "/tmp/ghettoVCB-2012-10-16_15-46-10.log" ... 2012-10-16 15:46:10 -- info: ERROR: Incorrect number of arguments! ############################################################################### # # ghettoVCB for ESX/ESXi 3.5, 4.x+ and 5.0 # Author: William Lam # http://www.virtuallyghetto.com/ # Documentation: http://communities.vmware.com/docs/DOC-8760 # Created: 11/17/2008 # Last modified: 2011_11_19 Version 1 # ############################################################################### Usage: ./ghettoVCB.sh -f [VM_BACKUP_UP_LIST] -c [VM_CONFIG_DIR] -l [LOG_FILE] -d [DEBUG_LEVEL] -g [GLOBAL_CONF] -e [VM_EXCLUSION_LIST] OPTIONS: -a Backup all VMs on host (備份主機上所有的虛擬機) -f List of VMs to backup (針對List名單內的虛擬機備份) -c VM configuration directory for VM backups (VM 配置目錄for VM備份) -g Path to global ghettoVCB configuration file -l File to output logging (將LOG記錄寫到指定檔案內) -d Debug level [info|debug|dryrun] (default: info) (Debug測試,不會產生備份) (e.g.) Backup VMs stored in a list 只備份list內的虛擬機 ./ghettoVCB.sh -f vms_to_backup Backup all VMs residing on this host 全部備份 ./ghettoVCB.sh -a Backup all VMs residing on this host except for the VMs in the exclusion list 除了排除清單(vm_exclusion_list)上的虛擬機外,剩下的都備份 ./ghettoVCB.sh -a -e vm_exclusion_list Backup VMs based on specific configuration located in directory 根據vm_backup_configs中特定配置來備份vms_to_backup內指定的虛擬機 ./ghettoVCB.sh -f vms_to_backup -c vm_backup_configs Backup VMs using global ghettoVCB configuration file 備份虛擬機時使用ghettoVCB.conf此設定檔來備份vms_to_backup內指定的虛擬機 ./ghettoVCB.sh -f vms_to_backup -g /global/ghettoVCB.conf Output will log to /tmp/ghettoVCB.log (consider logging to local or remote datastore to persist logs) 輸出的記錄到/tmp/ghettoVCB.log(可自行設定LOG所儲存的路徑和檔案) ./ghettoVCB.sh -f vms_to_backup -l /vmfs/volume/local-storage/ghettoVCB.log Dry run (no backup will take place) Debug測試,不會產生備份 ./ghettoVCB.sh -f vms_to_backup -d dryrun |
3. 操作範例
在了解相關參數和設定之後,就用一個比較簡單的範例來實作一次。
以下的操作請都在「lamw-ghettoVCB-518cef7」資料夾內操作
3.1建立備份 List表
在開始操作之前,先來建立vms_to_backup
List的名稱可自己設定
1 2 3 |
~ # vi vms_to_backup #加入要指定的虛擬機名稱 Linux |
3.2 Debug 測試備份
用來排除故障是相當好用的
此模式執行後會提供更詳細的訊息,內容包括備份檔案和LOG存放的路徑,以及備份使用到的空間相關訊息。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
~ # ./ghettoVCB.sh -f vms_to_backup -d debug Logging output to "/tmp/ghettoVCB-2012-10-16_13-20-15.log" ... Insufficient arguments. 2012-10-16 13:20:15 -- info: ========== ghettoVCB LOG START=========== 2012-10-16 13:20:15 -- debug: Succesfully acquired lock directory – /tmp/ghettoVCB.lock 2012-10-16 13:20:15 -- debug: HOST VERSION: VMware ESXi 5.0.0 build-469512 2012-10-16 13:20:15 -- debug: HOST LEVEL: VMware ESXi 5.0.0 GA 2012-10-16 13:20:16 -- debug: HOSTNAME: localhost 2012-10-16 13:20:16 -- info: CONFIG - VERSION = 2012_10_16_1 2012-10-16 13:20:16 -- info: CONFIG - GHETTOVCB_PID = 450122 2012-10-16 13:20:16 -- info: CONFIG - VM_BACKUP_VOLUME = /vmfs/volumes/datastore1/backup/backup 2012-10-16 13:20:16 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 3 2012-10-16 13:20:16 -- info: CONFIG - VM_BACKUP_DIR_NAMING_CONVENTION = 2011-12-27_13-37-15 2012-10-16 13:20:16 -- info: CONFIG - DISK_BACKUP_FORMAT = thin 2012-10-16 13:20:16 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0 2012-10-16 13:20:16 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0 2012-10-16 13:20:16 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 3 2012-10-16 13:20:16 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5 2012-10-16 13:20:16 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15 2012-10-16 13:20:16 -- info: CONFIG - LOG_LEVEL = debug 2012-10-16 13:20:16 -- info: CONFIG - BACKUP_LOG_OUTPUT = /tmp/ghettoVCB-2011-12-27_13-37-15.log 2012-10-16 13:20:16 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0 2012-10-16 13:20:16 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0 2012-10-16 13:20:16 -- info: CONFIG - VMDK_FILES_TO_BACKUP = all 2012-10-16 13:20:16 -- info: CONFIG - EMAIL_LOG = 0 2012-10-16 13:20:16 -- info: 2012-10-16 13:20:19 -- debug: Storage Information before backup: 2012-10-16 13:20:19 -- debug: SRC_DATASTORE: datastore1 2012-10-16 13:20:19 -- debug: SRC_DATASTORE_CAPACITY: 267.2 GB 2012-10-16 13:20:19 -- debug: SRC_DATASTORE_FREE: 146.2 GB 2012-10-16 13:20:19 -- debug: SRC_DATASTORE_BLOCKSIZE: 1 2012-10-16 13:20:19 -- debug: SRC_DATASTORE_MAX_FILE_SIZE: 256 GB 2012-10-16 13:20:19 -- debug: 2012-10-16 13:20:19 -- debug: DST_DATASTORE: datastore1 2012-10-16 13:20:19 -- debug: DST_DATASTORE_CAPACITY: 267.2 GB 2012-10-16 13:20:19 -- debug: DST_DATASTORE_FREE: 146.2 GB 2012-10-16 13:20:19 -- debug: DST_DATASTORE_BLOCKSIZE: 1 2012-10-16 13:20:19 -- debug: DST_DATASTORE_MAX_FILE_SIZE: 256 GB 2012-10-16 13:20:19 -- debug: 2012-10-16 13:20:19 -- debug: getVMDKs() - linux.vmdk###100: 2012-10-16 13:20:19 -- info: Initiate backup for linux 2012-10-16 13:20:19 -- info: Creating Snapshot "ghettoVCB-snapshot-2012-10-16" for linux 2012-10-16 13:20:21 -- debug: Waiting for snapshot "ghettoVCB-snapshot-2012-10-16" to be created 2012-10-16 13:20:21 -- debug: Snapshot timeout set to: 900 seconds 2012-10-16 13:20:22 -- debug: findVMDK() - Searching for VMDK: "linux.vmdk" to backup 2012-10-16 13:20:22 -- debug: /sbin/vmkfstools -i "/vmfs/volumes/datastore1/linux/linux.vmdk" -a "lsilogic" -d "thin" "/vmfs/volumes/datastore1/backup/backup/linux/linux-2012-10-16_13-20-15/linux.vmdk" Destination disk format: VMFS thin-provisioned Cloning disk '/vmfs/volumes/datastore1/linux/linux.vmdk'... Clone: 94% done. 2011-12-27 13:38:19 -- info: Removing snapshot from linux ... 2011-12-27 13:38:19 -- info: Backup Duration: 60 Seconds 2011-12-27 13:38:19 -- info: Successfully completed backup for linux! 2011-12-27 13:38:21 -- debug: Storage Information after backup: 2011-12-27 13:38:21 -- debug: SRC_DATASTORE: datastore1 2011-12-27 13:38:21 -- debug: SRC_DATASTORE_CAPACITY: 267.2 GB 2011-12-27 13:38:21 -- debug: SRC_DATASTORE_FREE: 146.2 GB 2011-12-27 13:38:21 -- debug: SRC_DATASTORE_BLOCKSIZE: 1 2011-12-27 13:38:21 -- debug: SRC_DATASTORE_MAX_FILE_SIZE: 256 GB 2011-12-27 13:38:21 -- debug: 2011-12-27 13:38:21 -- debug: DST_DATASTORE: datastore1 2011-12-27 13:38:21 -- debug: DST_DATASTORE_CAPACITY: 267.2 GB 2011-12-27 13:38:21 -- debug: DST_DATASTORE_FREE: 146.2 GB 2011-12-27 13:38:21 -- debug: DST_DATASTORE_BLOCKSIZE: 1 2011-12-27 13:38:21 -- debug: DST_DATASTORE_MAX_FILE_SIZE: 256 GB 2011-12-27 13:38:21 -- debug: 2011-12-27 13:38:21 -- info: ###### Final status: All VMs backed up OK! ###### 2011-12-27 13:38:21 -- debug: Succesfully removed lock directory - /tmp/ghettoVCB.lock 2011-12-27 13:38:21 -- info: ===========ghettoVCB LOG END============= |
3.3 Dryrun 測試
主要是先測試備份看是否有問題,使用 Dryrun 模式來測試的話是不會產生備份檔的
以下有幾個比較需要知道的部份會有注解說明
在預設定情況下log都是存放在/tmp內,若是有需要保留log的話請參考「VMware esxi 備份ghettoVCB.sh進階設定」來修改log存放處,避免重開機後log會被清除
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
~ # ./ghettoVCB.sh -f vms_to_backup -d dryrun Logging output to "/tmp/ghettoVCB-2012-10-16_13-23-26.log" ... #備份LOG所存放的地方 Insufficient arguments. 2012-10-16 13:23:26 -- info: =========== ghettoVCB LOG START ============ 2012-10-16 13:23:26 -- info: CONFIG - VERSION = 2012_10_16_1 2012-10-16 13:23:26 -- info: CONFIG - GHETTOVCB_PID = 449441 2012-10-16 13:23:26 -- info: CONFIG - VM_BACKUP_VOLUME = /vmfs/volumes/datastore1/backup/backup 2012-10-16 13:23:26 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 3 2012-10-16 13:23:26 -- info: CONFIG - VM_BACKUP_DIR_NAMING_CONVENTION = 2011-12-27_13-23-26 2012-10-16 13:23:26 -- info: CONFIG - DISK_BACKUP_FORMAT = thin 2012-10-16 13:23:26 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0 2012-10-16 13:23:26 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0 2012-10-16 13:23:26 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 3 2012-10-16 13:23:26 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5 2012-10-16 13:23:26 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15 2012-10-16 13:23:26 -- info: CONFIG - LOG_LEVEL = dryrun 2012-10-16 13:23:26 -- info: CONFIG - BACKUP_LOG_OUTPUT = /tmp/ghettoVCB-2012-10-16_13-23-26.log #備份LOG所存放的地方 2012-10-16 13:23:26 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0 2012-10-16 13:23:26 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0 2012-10-16 13:23:26 -- info: CONFIG - VMDK_FILES_TO_BACKUP = all 2012-10-16 13:23:26 -- info: CONFIG - EMAIL_LOG = 0 2012-10-16 13:23:26 -- info: 2012-10-16 13:23:27 -- dryrun: ############################################### 2012-10-16 13:23:27 -- dryrun: Virtual Machine: linux 2012-10-16 13:23:27 -- dryrun: VM_ID: 1 2012-10-16 13:23:27 -- dryrun: VMX_PATH: /vmfs/volumes/datastore1/linux/linux.vmx 2012-10-16 13:23:27 -- dryrun: VMX_DIR: /vmfs/volumes/datastore1/linux 2012-10-16 13:23:27 -- dryrun: VMX_CONF: linux/linux.vmx 2012-10-16 13:23:27 -- dryrun: VMFS_VOLUME: datastore1 2012-10-16 13:23:27 -- dryrun: VMDK(s): 2012-10-16 13:23:27 -- dryrun: linux.vmdk 100 GB #備份VM的大小 2012-10-16 13:23:27 -- dryrun: INDEPENDENT VMDK(s): 2012-10-16 13:23:27 -- dryrun: TOTAL_VM_SIZE_TO_BACKUP: 100 GB #總備份的大小 2012-10-16 13:23:27 -- dryrun: ############################################### 2012-10-16 13:23:27 -- info: ###### Final status: OK, only a dryrun. ###### #告知測試是否OK,並告知此次只有dryrun 2012-10-16 13:23:27 -- info: ==========ghettoVCB LOG END ============= |
以下為三種備份方式,請依需要設定
3.4 針對list (vms_to_backup) 中指定的VM虛擬機進行備份
1 |
~ # ./ghettoVCB.sh -f vms_to_backup |
3.5 備份所有的VM虛擬機
1 |
~ # ./ghettoVCB.sh -a |
3.6 排除list中指定的VM虛擬機不進行備份外,其他全部備份
1 2 3 4 |
~ # vi vm_exclusion_list #加入要指定排除的虛擬機名稱 linux ~ # ./ghettoVCB.sh -a -e vm_exclusion_list |
評論
此文章尚無評論。