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

Method save

src/borg/cache.py:122–133  ·  view source on GitHub ↗
(self, manifest, key)

Source from the content-addressed store, hash-verified

120 logger.warning("Could not read/parse key type file: %s", exc)
121
122 def save(self, manifest, key):
123 logger.debug("security: saving state for %s to %s", self.repository.id_str, str(self.dir))
124 current_location = self.repository._location.canonical_path()
125 logger.debug("security: current location %s", current_location)
126 logger.debug("security: key type %s", str(key.TYPE))
127 logger.debug("security: manifest timestamp %s", manifest.timestamp)
128 with SaveFile(self.location_file) as fd:
129 fd.write(current_location)
130 with SaveFile(self.key_type_file) as fd:
131 fd.write(str(key.TYPE))
132 with SaveFile(self.manifest_ts_file) as fd:
133 fd.write(manifest.timestamp)
134
135 def assert_location_matches(self):
136 # Warn user before sending data to a relocated repository

Callers 2

_assert_secureMethod · 0.95
assert_access_unknownMethod · 0.95

Calls 4

SaveFileClass · 0.85
debugMethod · 0.80
canonical_pathMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected