From: Stefan Huber Date: Tue, 19 Dec 2017 18:55:10 +0000 (+0100) Subject: Close logger before dir rename X-Git-Tag: v2.2~1 X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=92451d8949232e28a931af488f4ccbaa21da5b4f;p=sitarba.git Close logger before dir rename Certain filesystems require that the log file is closed befor the containing backup directory is renamed from its temporary name to the final name. --- diff --git a/sitarba b/sitarba index ecf6f5f..9a7519b 100755 --- 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) )