From: Dobrica Pavlinusic Date: Sun, 1 Mar 2015 14:21:49 +0000 (+0100) Subject: support more than one instance as argument X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;ds=sidebyside;h=c8662b06c219cd8b3700aea76b35fd6db667ba4b;hp=b392cd18bad8e411a4e39816628d876ef49ab749;p=gnt-info support more than one instance as argument --- diff --git a/gnt-backup.sh b/gnt-backup.sh index e6ffc8f..725d998 100755 --- a/gnt-backup.sh +++ b/gnt-backup.sh @@ -1,9 +1,11 @@ #!/bin/sh -xe -instance=$1 node=arh-hw ganeti_export=arh-hw/ganeti/export +while true ; do + +instance=$1 if [ -z "$instance" ] ; then ssh $node zfs list -t all -r $ganeti_export exit 0 @@ -14,4 +16,6 @@ gnt-instance list -o name,status,oper_vcpus,oper_ram,disk_usage,pnode,snodes $in gnt-backup export --noshutdown -n $node $instance || true # ignore error on swap partition ssh $node zfs snap ${ganeti_export}@`date +%Y-%m-%d`_${instance} +shift +done