summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdiff-backup/rdiff_backup/robust.py8
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py3
-rw-r--r--rdiff-backup/src/hardlink.py18
-rwxr-xr-xrdiff-backup/src/main.py4
-rw-r--r--rdiff-backup/src/robust.py8
-rw-r--r--rdiff-backup/src/rpath.py3
6 files changed, 23 insertions, 21 deletions
diff --git a/rdiff-backup/rdiff_backup/robust.py b/rdiff-backup/rdiff_backup/robust.py
index a71eabc..cb09baa 100644
--- a/rdiff-backup/rdiff_backup/robust.py
+++ b/rdiff-backup/rdiff_backup/robust.py
@@ -297,13 +297,13 @@ class SaveState:
(Globals.rbdir.conn, Globals.backup_writer)
if incrementing: cls._last_file_sym = Globals.rbdir.append(
- "last-file-incremented.%s.snapshot" % Time.curtimestr)
+ "last-file-incremented.%s.data" % Time.curtimestr)
else: cls._last_file_sym = Globals.rbdir.append(
- "last-file-mirrored.%s.snapshot" % Time.curtimestr)
+ "last-file-mirrored.%s.data" % Time.curtimestr)
cls._checkpoint_rp = Globals.rbdir.append(
- "checkpoint-data.%s.snapshot" % Time.curtimestr)
+ "checkpoint-data.%s.data" % Time.curtimestr)
cls._last_file_definitive_rp = Globals.rbdir.append(
- "last-file-definitive.%s.snapshot" % Time.curtimestr)
+ "last-file-definitive.%s.data" % Time.curtimestr)
def touch_last_file(cls):
"""Touch last file marker, indicating backup has begun"""
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index 110b89f..748cab4 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -714,7 +714,8 @@ class RPath(RORPath):
timestring, ext = dotsplit[-2:]
if Time.stringtotime(timestring) is None: return None
if not (ext == "snapshot" or ext == "dir" or
- ext == "missing" or ext == "diff"): return None
+ ext == "missing" or ext == "diff" or ext == "data"):
+ return None
self.inc_timestr = timestring
self.inc_compressed = compressed
self.inc_type = ext
diff --git a/rdiff-backup/src/hardlink.py b/rdiff-backup/src/hardlink.py
index 7531ad3..7f97c4a 100644
--- a/rdiff-backup/src/hardlink.py
+++ b/rdiff-backup/src/hardlink.py
@@ -157,8 +157,8 @@ class Hardlink:
"""Return RPath of linkdata, or None if cannot find"""
for rp in map(data_rpath.append, data_rpath.listdir()):
if (rp.isincfile() and rp.getincbase_str() == prefix and
- rp.getinctype() == 'snapshot' and
- Time.stringtotime(rp.getinctime()) == time):
+ (rp.getinctype() == 'snapshot' or rp.getinctype() == 'data')
+ and Time.stringtotime(rp.getinctime()) == time):
return rp
return None
@@ -176,9 +176,9 @@ class Hardlink:
if not cls._src_index_indicies: return
Log("Writing hard link data", 6)
if Globals.compression:
- rp = Globals.rbdir.append("hardlink_data.%s.snapshot.gz" %
+ rp = Globals.rbdir.append("hardlink_data.%s.data.gz" %
Time.curtimestr)
- else: rp = Globals.rbdir.append("hardlink_data.%s.snapshot" %
+ else: rp = Globals.rbdir.append("hardlink_data.%s.data" %
Time.curtimestr)
cls.write_linkdict(rp, cls._src_index_indicies, Globals.compression)
@@ -200,13 +200,13 @@ class Hardlink:
"""
Log("Writing intermediate hard link data to disk", 2)
src_inode_rp = data_rpath.append("hardlink_source_inode_checkpoint."
- "%s.snapshot" % Time.curtimestr)
+ "%s.data" % Time.curtimestr)
src_index_rp = data_rpath.append("hardlink_source_index_checkpoint."
- "%s.snapshot" % Time.curtimestr)
+ "%s.data" % Time.curtimestr)
dest_inode_rp = data_rpath.append("hardlink_dest_inode_checkpoint."
- "%s.snapshot" % Time.curtimestr)
+ "%s.data" % Time.curtimestr)
dest_index_rp = data_rpath.append("hardlink_dest_index_checkpoint."
- "%s.snapshot" % Time.curtimestr)
+ "%s.data" % Time.curtimestr)
for (rp, dict) in ((src_inode_rp, cls._src_inode_indicies),
(src_index_rp, cls._src_index_indicies),
(dest_inode_rp, cls._dest_inode_indicies),
@@ -247,7 +247,7 @@ class Hardlink:
"hardlink_dest_index_checkpoint"]
for rp in map(Globals.rbdir.append, Globals.rbdir.listdir()):
if (rp.isincfile() and rp.getincbase_str() in prefix_list and
- rp.getinctype() == 'snapshot'):
+ (rp.getinctype() == 'snapshot' or rp.getinctype() == 'data')):
rp.delete()
MakeClass(Hardlink)
diff --git a/rdiff-backup/src/main.py b/rdiff-backup/src/main.py
index 162cecf..bb377a5 100755
--- a/rdiff-backup/src/main.py
+++ b/rdiff-backup/src/main.py
@@ -306,14 +306,14 @@ went wrong during your last backup? Using """ + mirrorrps[-1].path, 2)
return Time.stringtotime(timestr)
def backup_touch_curmirror(self, rpin, rpout):
- """Make a file like current_mirror.time.snapshot to record time
+ """Make a file like current_mirror.time.data to record time
Also updates rpout so mod times don't get messed up.
"""
map(RPath.delete, self.backup_get_mirrorrps())
mirrorrp = self.datadir.append("current_mirror.%s.%s" %
- (Time.curtimestr, "snapshot"))
+ (Time.curtimestr, "data"))
Log("Touching mirror marker %s" % mirrorrp.path, 6)
mirrorrp.touch()
RPath.copy_attribs(rpin, rpout)
diff --git a/rdiff-backup/src/robust.py b/rdiff-backup/src/robust.py
index a71eabc..cb09baa 100644
--- a/rdiff-backup/src/robust.py
+++ b/rdiff-backup/src/robust.py
@@ -297,13 +297,13 @@ class SaveState:
(Globals.rbdir.conn, Globals.backup_writer)
if incrementing: cls._last_file_sym = Globals.rbdir.append(
- "last-file-incremented.%s.snapshot" % Time.curtimestr)
+ "last-file-incremented.%s.data" % Time.curtimestr)
else: cls._last_file_sym = Globals.rbdir.append(
- "last-file-mirrored.%s.snapshot" % Time.curtimestr)
+ "last-file-mirrored.%s.data" % Time.curtimestr)
cls._checkpoint_rp = Globals.rbdir.append(
- "checkpoint-data.%s.snapshot" % Time.curtimestr)
+ "checkpoint-data.%s.data" % Time.curtimestr)
cls._last_file_definitive_rp = Globals.rbdir.append(
- "last-file-definitive.%s.snapshot" % Time.curtimestr)
+ "last-file-definitive.%s.data" % Time.curtimestr)
def touch_last_file(cls):
"""Touch last file marker, indicating backup has begun"""
diff --git a/rdiff-backup/src/rpath.py b/rdiff-backup/src/rpath.py
index 110b89f..748cab4 100644
--- a/rdiff-backup/src/rpath.py
+++ b/rdiff-backup/src/rpath.py
@@ -714,7 +714,8 @@ class RPath(RORPath):
timestring, ext = dotsplit[-2:]
if Time.stringtotime(timestring) is None: return None
if not (ext == "snapshot" or ext == "dir" or
- ext == "missing" or ext == "diff"): return None
+ ext == "missing" or ext == "diff" or ext == "data"):
+ return None
self.inc_timestr = timestring
self.inc_compressed = compressed
self.inc_type = ext