X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=gnt-backup.sh;h=725d998b6a6ad9bcb3e4b8289d4f38be8ddd10d3;hb=c8662b06c219cd8b3700aea76b35fd6db667ba4b;hp=93dc44870459dcdaa68547029f6f02f8738449d7;hpb=2e7c5fb13d652dc16b0377a7cb38daa9d82a7527;p=gnt-info diff --git a/gnt-backup.sh b/gnt-backup.sh index 93dc448..725d998 100755 --- a/gnt-backup.sh +++ b/gnt-backup.sh @@ -1,15 +1,21 @@ #!/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 fi + +gnt-instance list -o name,status,oper_vcpus,oper_ram,disk_usage,pnode,snodes $instance 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