xenserver备份脚本
xenserver备份脚本
pool metadata备份脚本:
#!/bin/bash xedate1=` date +%Y_%m_%d` if [ ! -d /home/pool_md ] then mkdir -p /home/pool_md fi xe pool-dump-database file -name= /home/pool_md/pool_md_ "$xedate1" find /home/pool_md -mtime +3 - exec rm -rf {} \; |
vm/template/sr metadata备份脚本:
2 | #!/bin/bash xedate1=` date +%Y_%m_%d` if [ ! -d /home/vm_md ] then mkdir -p /home/vm_md fi sr_uuid1=`xe sr-list name-label=VM | awk '/uuid/{print $5}' ` sr_uuid2=`xe sr-list name-label=VM1 | awk '/uuid/{print $5}' ` xe-backup-metadata -c -u "${sr_uuid1}" > /home/vm_md/log1_ "$xedate1" 2>&1 xe-backup-metadata -c -u "${sr_uuid2}" > /home/vm_md/log2_ "$xedate1" 2>&1 find /home/vm_md -mtime +3 - exec rm -rf {} \; |
目录 返回
首页