From c8662b06c219cd8b3700aea76b35fd6db667ba4b Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 1 Mar 2015 15:21:49 +0100 Subject: [PATCH] support more than one instance as argument --- gnt-backup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.20.1