找到下面的地方,并添加红色部分的字符 #
# URL for the VC SDK instance to connect to. The format is #
# VCHOST=myvirtualcenter.company.com VCHOST=localhost #
# Username to use for VC SDK authentication #
# USERNAME=backup USERNAME=root #
# Password to user for VC SDK authentication
# WARNING: It is recommended that you don't specify the # password in the configuration file. #
# PASSWORD=XXX PASSWORD=密码 2.备份命令
[root@a2 /]# vcbMounter -a ipaddr:192.168.20.101 -r /vmfs/volumes/Edi3000/back
[2006-09-15 09:23:56.447 'App' 3076444288 info] Current working directory: /
[2006-09-15 09:23:56.486 'BaseLibs' 5860272 warning] [Vmdb_Unset] Unsetting unknown path: /vmomi/
Converting \(compact file):
0%=====================50%=====================100%
**************************************************
[root@a2 /]#
意思是备份Ip地址为192.168.20.101的虚拟机,备份路径放在本机/vmfs/volumes/Edi3000/back
3.恢复命令
[root@a2 /]# vcbRestore -s /vmfs/volumes/Edi3000/back -b overwrite
[2006-09-15 09:37:06.473 'App' 3076444288 info] Current working directory: /
[2006-09-15 09:37:06.511 'BaseLibs' 8919984 warning] [Vmdb_Unset] Unsetting unknown path: /vmomi/
Converting \(flat)):
0%=====================50%=====================100%
**************************************************
[root@a2 /]#
意思是从/vmfs/volumes/Edi3000/back中恢复数据,覆盖已存在的文件
4.考虑到备份文件存在本地不太安全,所以得用异地备份 VMware的方案是采用SCP插件,命令格式
vcbMounter -a ipaddr:vm37.company.com -r
scp://vmware@backups.company.com:/backups/VMs/vm37 因为我对Linux不够熟悉,所以没再架设实验环境 我是往Windows服务器里备份的,命令 [root@a2 /]# mkdir /mnt/smb
[root@a2 /]# mount -t smbfs -o username=用户名,password=密码,workgroup=域名 //服务器名/共享名 /mnt/smb
[root@a2 /]# vcbMounter -a ipaddr:192.168.20.101 -r /mnt/smb/back/
[2006-09-15 10:15:31.374 'App' 3076456576 info] Current working directory: /
[2006-09-15 10:15:31.413 'BaseLibs' 3750832 warning] [Vmdb_Unset] Unsetting unknown path: /vmomi/
Converting \ 0%=====================50%=====================100%
**************************************************
[root@a2 /]#
同样可以备份成功