]> git.sthu.org Git - sitarba.git/commitdiff
Close logger before dir rename
authorStefan Huber <shuber@sthu.org>
Tue, 19 Dec 2017 18:55:10 +0000 (19:55 +0100)
committerStefan Huber <shuber@sthu.org>
Tue, 19 Dec 2017 18:55:10 +0000 (19:55 +0100)
Certain filesystems require that the log file is closed befor the
containing backup directory is renamed from its temporary name to the
final name.

sitarba

diff --git a/sitarba b/sitarba
index ecf6f5f0b83adffe607c64a875d850b6ded5bc6d..9a7519bf515dc7d3e35a199dafec1cd60025d1bc 100755 (executable)
--- a/sitarba
+++ b/sitarba
@@ -532,6 +532,7 @@ class BackupManager:
             self.backupFileSet(s, targetdir, excludes, since)
 
         logfile.info("Stopped: " + datetime.datetime.now().ctime())
+        fil.close()
 
         # Rename backup directory to final name
         os.rename( targetdir, os.path.join(basedir, dirname) )