xenserver 备份backup和还原restore命令

 

转载:http://zhumeng8337797.blog.163.com/blog/static/100768914201425103713738/

1. 备份和还原pool中的metadata:
备份命令: xe pool-dump-database file-name=[filepath and name]
例子: xe pool-dump-database file-name=/dev/mnt/dbdump
还原命令:xe pool-restore-database file-name=[file path and name] dry-run=true
例子: xe pool-restore-database file-name=/dev/mnt/dbdump dry-run=true 
2. 备份和还原xenserver host系统:
备份命令:xe host-backup host=[hostname] file-name=[filepath and name.xbk]
例子: xe host-backup host=xenbx1 file-name=/dev/mnt/xenbx1.xbk 
注意:还原系统重启xenserver,从xenserver安装盘启动,选择“Restore from backup”,而且只能换到本机
3. 备份和还原xenserver vm虚拟机:
(1). 导出vm所有数据
       a. 关闭vm
       b. 用xe vm-list,获取vm的uuid
       c. 执行命令进行导出vm所有数据:
       xe vm-export vm=[vm_uuid] filename=[filepath and filename.xva]
      如:xe vm-export vm=XXX...xx filename=/dev/mnt/server1.xva
      如果只是导出metadata,则
      xe vm-export vm=[vm_uuid] filename=[filepath and filename.xva] --metadata
      如: xe vm-export vm=XXX...XX filename=/dev/mnt/server1.xva --metadata
(2). 导入vm
     xe vm-import sr=[SR_UUID] filename=[filepath and filename.xva]
     如: xe vm-import sr=RAID5 filename=/dev/mnt/server1.xva
4.  创建vm快照snapshot:
xe vm-snapshot vm=[vm_uuid] new-name-label=[vm snapshot name]
如: xe vm-snapshot vm=xxx...xx new-name-label=server1snap1 
更多可见
http://druku.net/xenbup.html
http://docs.vmd.citrix.com/XenSe ... b/installation.html
官方的关于备份和还原xenserver:
http://docs.vmd.citrix.com/XenSe ... ence.html#id2584082

上一篇:why happen "WaitHandles must be less than or equal to 64"


下一篇:ExtJS Grid导出excel文件