[Zetaback-devel] [zetaback commit] Zetaback branch, sendr, updated. ff3354c6ecfa942593f762298b324d83b8388073

git at labs.omniti.com git at labs.omniti.com
Mon Jun 6 15:23:13 EDT 2011


Pushed by: mark
The branch, sendr has been updated
       via  ff3354c6ecfa942593f762298b324d83b8388073 (commit)
      from  204b1e0cf4772722edc6b24000f114294476c5c1 (commit)

Summary of changes:
 zetaback.in |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Log:
commit ff3354c6ecfa942593f762298b324d83b8388073
Author: Mark Harrison <mark at mivok.net>
Date:   Mon Jun 6 15:23:02 2011 -0400

    Store the name of the currently transferring snapshot in a file

diff --git a/zetaback.in b/zetaback.in
index 0c0fe82..e99066c 100755
--- a/zetaback.in
+++ b/zetaback.in
@@ -666,6 +666,10 @@ sub zfs_do_backup($$$$$$;$) {
 
   # compression is meaningless for dataset backups
   if ($type ne "s") {
+    # Store the name of the currently transferring snapshot in a file
+    open(CURRENT, ">$store/zetaback.in-progress");
+    print CURRENT "$store/.$dumpname\n";
+    close(CURRENT);
     my $cl = config_get($host, 'compressionlevel');
     if ($cl >= 1 && $cl <= 9) {
         open(LBACKUP, "|gzip -$cl >$store/.$dumpname $DEBUGLOG") ||
@@ -697,6 +701,10 @@ sub zfs_do_backup($$$$$$;$) {
     }
     print STDERR "Receiving to zfs filesystem $storefs/$fsname\n"
       if($DEBUG);
+    # Store the name of the currently transferring snapshot in a file
+    open(CURRENT, ">$store/zetaback.in-progress");
+    print CURRENT "$storefs/$fsname\n";
+    close(CURRENT);
     if (config_get($host, 'dataset_recursive') == 1) {
       # We need to create filesystems as deep as the poolname and receive to
       # that in order to preserve the exact layout
@@ -803,8 +811,10 @@ sub zfs_do_backup($$$$$$;$) {
     chomp(my $error = $@);
     $error =~ s/[\r\n]+/ /gsm;
     zetaback_log($host, "FAILED[$error] $host:$fs $type\n");
+    unlink("$store/zetaback.in-progress");
     die "zfs_full_backup: failed $@";
   }
+  unlink("$store/zetaback.in-progress");
   my $size;
   if ($type ne "s") {
     my @st = stat("$store/$dumpname");




hooks/post-receive
-- 
Zetaback


More information about the Zetaback-devel mailing list