stat['path'] = "snapshot://" + dpath['path']
stat['volume'] = self.vol_no
+ self.logger.debug("[STORE] %s" % dpath['path'])
+
# backup file
tarobj.add(dpath['path'], arcname=stat['path'], recursive=False)
crc = binascii.crc32(s, crc) & 0xffffffff
index_fd.write(s)
elif action == 'delete':
+ path = self.unprefixed(ipath['path'])
stat = {
- u'path': u'delete://' + self.unprefixed(ipath['path']),
+ u'path': u'delete://' + path,
u'type': ipath['type']
}
+ self.logger.debug("[DELETE] %s" % path)
# mark it as deleted in the backup
tarobj.add("/dev/null", arcname=stat['path'])
index_fd.write(s)
elif action == 'list':
stat = dpath.copy()
- stat['path'] = u'list://' + self.unprefixed(ipath['path'])
+ path = self.unprefixed(ipath['path'])
+ stat['path'] = u'list://' + path
# unchanged files do not enter in the backup, only in the index
+ self.logger.debug("[UNCHANGED] %s" % path)
# store in the index the stat dict
s = bytes(json.dumps(stat) + '\n', 'UTF-8')
crc = binascii.crc32(s, crc) & 0xffffffff
index_fd.write(s)
- self.logger.debug("backup %s" % stat['path'])
s = bytes('{"type": "END-FILE-LIST"}\n', 'UTF-8')
crc = binascii.crc32(s, crc) & 0xffffffff