11==----------------根据快照名备份----------------------
#!/bin/sh
backup_date=`date +%Y-%m-%d`
echo backup_date: $backup_date
########更改此处快照名##########
snap_name=2016-06-06
########更改备份目录#########
snap_path_name=/root/zentao_backup
snapshot_uuid=`xe snapshot-list name-label=$snap_name params=uuid --minimal`
snap_vm_uuid=`xe snapshot-param-get uuid=$snapshot_uuid param-name=snapshot-of`
snap_vm_name=`xe vm-list uuid=$snap_vm_uuid params=name-label --minimal`
name_back="$snap_vm_name"_snapshot_$snap_name
#echo $name_back
#echo $snap_path_name
xe template-param-set is-a-template=false ha-always-run=false uuid=$snapshot_uuid
xe vm-export vm=$snapshot_uuid filename=$name_back-$backup_date.xva
本文出自 “11416160” 博客,转载请与作者联系!
xenserver snapshot backup根据快照名备份
原文地址:http://11426160.blog.51cto.com/11416160/1875090