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

Method do_debug_delete_obj

src/borg/archiver/debug_cmd.py:287–300  ·  view source on GitHub ↗

Deletes the objects with the given IDs from the repository.

(self, args, repository)

Source from the content-addressed store, hash-verified

285
286 @with_repository(manifest=False, exclusive=True)
287 def do_debug_delete_obj(self, args, repository):
288 """Deletes the objects with the given IDs from the repository."""
289 for hex_id in args.ids:
290 try:
291 id = hex_to_bin(hex_id, length=32)
292 except ValueError:
293 print("object id %s is invalid." % hex_id)
294 else:
295 try:
296 repository.delete(id)
297 print("object %s deleted." % hex_id)
298 except Repository.ObjectNotFound:
299 print("object %s not found." % hex_id)
300 print("Done.")
301
302 def do_debug_convert_profile(self, args):
303 """Converts a Borg profile to a Python profile."""

Callers

nothing calls this directly

Calls 2

hex_to_binFunction · 0.85
deleteMethod · 0.45

Tested by

no test coverage detected