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

Method add_reference

src/borg/archive.py:2006–2012  ·  view source on GitHub ↗
(id_, size, cdata)

Source from the content-addressed store, hash-verified

2004 return id_
2005
2006 def add_reference(id_, size, cdata):
2007 # either we already have this chunk in repo and chunks index or we add it now
2008 if id_ not in self.chunks:
2009 assert cdata is not None
2010 self.chunks[id_] = ChunkIndexEntry(flags=ChunkIndex.F_USED, size=size)
2011 if self.repair:
2012 self.repository.put(id_, cdata)
2013
2014 def verify_file_chunks(archive_name, item):
2015 """Verifies that all file chunks are present. Missing file chunks will be logged."""

Callers

nothing calls this directly

Calls 1

putMethod · 0.45

Tested by

no test coverage detected