Commit e2e6a2fa authored by ben's avatar ben

Various data files now end in .data instead of .snapshot


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@76 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 83d52ad9
...@@ -297,13 +297,13 @@ class SaveState: ...@@ -297,13 +297,13 @@ class SaveState:
(Globals.rbdir.conn, Globals.backup_writer) (Globals.rbdir.conn, Globals.backup_writer)
if incrementing: cls._last_file_sym = Globals.rbdir.append( 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( 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( 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( 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): def touch_last_file(cls):
"""Touch last file marker, indicating backup has begun""" """Touch last file marker, indicating backup has begun"""
......
...@@ -714,7 +714,8 @@ class RPath(RORPath): ...@@ -714,7 +714,8 @@ class RPath(RORPath):
timestring, ext = dotsplit[-2:] timestring, ext = dotsplit[-2:]
if Time.stringtotime(timestring) is None: return None if Time.stringtotime(timestring) is None: return None
if not (ext == "snapshot" or ext == "dir" or 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_timestr = timestring
self.inc_compressed = compressed self.inc_compressed = compressed
self.inc_type = ext self.inc_type = ext
......
...@@ -157,8 +157,8 @@ class Hardlink: ...@@ -157,8 +157,8 @@ class Hardlink:
"""Return RPath of linkdata, or None if cannot find""" """Return RPath of linkdata, or None if cannot find"""
for rp in map(data_rpath.append, data_rpath.listdir()): for rp in map(data_rpath.append, data_rpath.listdir()):
if (rp.isincfile() and rp.getincbase_str() == prefix and if (rp.isincfile() and rp.getincbase_str() == prefix and
rp.getinctype() == 'snapshot' and (rp.getinctype() == 'snapshot' or rp.getinctype() == 'data')
Time.stringtotime(rp.getinctime()) == time): and Time.stringtotime(rp.getinctime()) == time):
return rp return rp
return None return None
...@@ -176,9 +176,9 @@ class Hardlink: ...@@ -176,9 +176,9 @@ class Hardlink:
if not cls._src_index_indicies: return if not cls._src_index_indicies: return
Log("Writing hard link data", 6) Log("Writing hard link data", 6)
if Globals.compression: if Globals.compression:
rp = Globals.rbdir.append("hardlink_data.%s.snapshot.gz" % rp = Globals.rbdir.append("hardlink_data.%s.data.gz" %
Time.curtimestr) Time.curtimestr)
else: rp = Globals.rbdir.append("hardlink_data.%s.snapshot" % else: rp = Globals.rbdir.append("hardlink_data.%s.data" %
Time.curtimestr) Time.curtimestr)
cls.write_linkdict(rp, cls._src_index_indicies, Globals.compression) cls.write_linkdict(rp, cls._src_index_indicies, Globals.compression)
...@@ -200,13 +200,13 @@ class Hardlink: ...@@ -200,13 +200,13 @@ class Hardlink:
""" """
Log("Writing intermediate hard link data to disk", 2) Log("Writing intermediate hard link data to disk", 2)
src_inode_rp = data_rpath.append("hardlink_source_inode_checkpoint." 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." 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." 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." 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), for (rp, dict) in ((src_inode_rp, cls._src_inode_indicies),
(src_index_rp, cls._src_index_indicies), (src_index_rp, cls._src_index_indicies),
(dest_inode_rp, cls._dest_inode_indicies), (dest_inode_rp, cls._dest_inode_indicies),
...@@ -247,7 +247,7 @@ class Hardlink: ...@@ -247,7 +247,7 @@ class Hardlink:
"hardlink_dest_index_checkpoint"] "hardlink_dest_index_checkpoint"]
for rp in map(Globals.rbdir.append, Globals.rbdir.listdir()): for rp in map(Globals.rbdir.append, Globals.rbdir.listdir()):
if (rp.isincfile() and rp.getincbase_str() in prefix_list and if (rp.isincfile() and rp.getincbase_str() in prefix_list and
rp.getinctype() == 'snapshot'): (rp.getinctype() == 'snapshot' or rp.getinctype() == 'data')):
rp.delete() rp.delete()
MakeClass(Hardlink) MakeClass(Hardlink)
...@@ -306,14 +306,14 @@ went wrong during your last backup? Using """ + mirrorrps[-1].path, 2) ...@@ -306,14 +306,14 @@ went wrong during your last backup? Using """ + mirrorrps[-1].path, 2)
return Time.stringtotime(timestr) return Time.stringtotime(timestr)
def backup_touch_curmirror(self, rpin, rpout): 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. Also updates rpout so mod times don't get messed up.
""" """
map(RPath.delete, self.backup_get_mirrorrps()) map(RPath.delete, self.backup_get_mirrorrps())
mirrorrp = self.datadir.append("current_mirror.%s.%s" % mirrorrp = self.datadir.append("current_mirror.%s.%s" %
(Time.curtimestr, "snapshot")) (Time.curtimestr, "data"))
Log("Touching mirror marker %s" % mirrorrp.path, 6) Log("Touching mirror marker %s" % mirrorrp.path, 6)
mirrorrp.touch() mirrorrp.touch()
RPath.copy_attribs(rpin, rpout) RPath.copy_attribs(rpin, rpout)
......
...@@ -297,13 +297,13 @@ class SaveState: ...@@ -297,13 +297,13 @@ class SaveState:
(Globals.rbdir.conn, Globals.backup_writer) (Globals.rbdir.conn, Globals.backup_writer)
if incrementing: cls._last_file_sym = Globals.rbdir.append( 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( 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( 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( 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): def touch_last_file(cls):
"""Touch last file marker, indicating backup has begun""" """Touch last file marker, indicating backup has begun"""
......
...@@ -714,7 +714,8 @@ class RPath(RORPath): ...@@ -714,7 +714,8 @@ class RPath(RORPath):
timestring, ext = dotsplit[-2:] timestring, ext = dotsplit[-2:]
if Time.stringtotime(timestring) is None: return None if Time.stringtotime(timestring) is None: return None
if not (ext == "snapshot" or ext == "dir" or 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_timestr = timestring
self.inc_compressed = compressed self.inc_compressed = compressed
self.inc_type = ext self.inc_type = ext
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment