restverify 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- restverify/__init__.py +25 -0
- restverify/__main__.py +11 -0
- restverify/cli.py +1039 -0
- restverify/compare.py +221 -0
- restverify/config.py +176 -0
- restverify/errors.py +193 -0
- restverify/excludes.py +165 -0
- restverify/history.py +292 -0
- restverify/manifest.py +226 -0
- restverify/restic.py +180 -0
- restverify/sampling.py +193 -0
- restverify/tempstore.py +128 -0
- restverify-0.1.0.dist-info/METADATA +83 -0
- restverify-0.1.0.dist-info/RECORD +16 -0
- restverify-0.1.0.dist-info/WHEEL +4 -0
- restverify-0.1.0.dist-info/entry_points.txt +2 -0
restverify/__init__.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""restverify — rehearse and verify restic restores locally.
|
|
2
|
+
|
|
3
|
+
Scope contract (GAP-RESEARCH-2026-09.pdf): this tool RESTORES and VERIFIES.
|
|
4
|
+
It never creates backups, never runs forget/prune, and never asks for a
|
|
5
|
+
provider account. Passwords are never stored by this tool.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0"
|
|
9
|
+
|
|
10
|
+
# Exit-code contract (PDF, normative). Exposed as constants so tests and
|
|
11
|
+
# callers reference the contract rather than magic numbers.
|
|
12
|
+
EXIT_PASS = 0 # restore + verification succeeded
|
|
13
|
+
EXIT_RESTORE_FAIL = 1 # restic could not restore the snapshot
|
|
14
|
+
EXIT_DIFF_MISMATCH = 2 # restored data differs from the source
|
|
15
|
+
|
|
16
|
+
# Usage-class failures (bad flag, unusable config, missing prerequisite) are NOT
|
|
17
|
+
# verification outcomes, so they must not borrow 1 or 2. 64 is the conventional
|
|
18
|
+
# "usage error" code from sysexits.h. Documented in --help and reported as a
|
|
19
|
+
# deliberate extension of the PDF contract (which only names 0/1/2).
|
|
20
|
+
EXIT_USAGE = 64
|
|
21
|
+
|
|
22
|
+
# Public JSON envelope contract (I3c). Every payload emitted by --json carries
|
|
23
|
+
# this number. A breaking shape change increments it; it is never edited
|
|
24
|
+
# silently. The envelope itself is documented in `restverify run --help`.
|
|
25
|
+
SCHEMA_VERSION = 1
|
restverify/__main__.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""``python -m restverify`` — the same entry point as the ``restverify`` script.
|
|
2
|
+
|
|
3
|
+
``cli._cron_binary`` falls back to ``<python> -m restverify`` when the console
|
|
4
|
+
script is not on PATH (the running-from-a-checkout case), so this module is the
|
|
5
|
+
load-bearing half of that contract: without it the printed cron line dies with
|
|
6
|
+
"No module named restverify.__main__" on every platform.
|
|
7
|
+
"""
|
|
8
|
+
from restverify.cli import main
|
|
9
|
+
|
|
10
|
+
if __name__ == "__main__":
|
|
11
|
+
raise SystemExit(main())
|