MCPcopy
hub / github.com/borgbackup/borg / decrypt_dump

Method decrypt_dump

src/borg/archiver/debug_cmd.py:115–123  ·  view source on GitHub ↗
(id, cdata)

Source from the content-addressed store, hash-verified

113 from ..crypto.key import key_factory
114
115 def decrypt_dump(id, cdata):
116 if cdata is not None:
117 _, data = repo_objs.parse(id, cdata, ro_type=ROBJ_DONTCARE)
118 else:
119 _, data = {}, b""
120 filename = f"{bin_to_hex(id)}.obj"
121 print("Dumping", filename)
122 with open(filename, "wb") as fd:
123 fd.write(data)
124
125 # set up the key without depending on a manifest obj
126 result = repository.list(limit=1, marker=None)

Callers

nothing calls this directly

Calls 3

bin_to_hexFunction · 0.85
parseMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected