[snapshot/master] Change tempnames during dumpall
In a dump-all run we write a dump's content to a temporary
file and then link/unlink it to rename it to its final name.
These temporary filenames now have a '.tmp.' in their name
so we can exclude them from rsync.
---
snapshot | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/snapshot b/snapshot
index 28d0e75..6d48c47 100755
--- a/snapshot
+++ b/snapshot
@@ -1274,7 +1274,7 @@ class SnapshotDumpAll
@db.query("SELECT mirrorrun_id FROM mirrorrun ORDER BY mirrorrun_id") do |row|
target = @path+"/"+row['mirrorrun_id'].to_s
next if File.exists?(target)
- tmptarget = target + "."+randstring()+"."+(Process.pid.to_s)
+ tmptarget = target + ".tmp."+randstring()+"."+(Process.pid.to_s)
$logger.debug("dumping mirrorrun ##{row['mirrorrun_id']}")
--
1.5.6.5
Reply to: