support more than one instance as argument
[gnt-info] / gnt-backup.sh
index e6ffc8f..725d998 100755 (executable)
@@ -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