What it does
kynetra backup create seals one project into a bundle directory with a manifest and a records file. The manifest carries per-record checksums and an optional HMAC signature, and the records can be encrypted with AES-256-GCM. Verify proves a bundle is intact before restore, and push and pull move a verified bundle to and from an S3-compatible object store.
How it works
A bundle is a directory holding manifest.json and records.jsonl (or an encrypted records file). The manifest records the bundle id, the engine version and entity-schema version that wrote it, a checksum for every record, a digest of the payload, the capability flags the bundle assumes, index rebuild metadata, and the list of resources the bundle deliberately excludes. Records are the project's entities, found by enumerating the project's key prefix, with embeddings inline. Because every record a project owns carries the same prefix, a bundle holds exactly one project and cannot pick up another's records.
Signing is a detached HMAC-SHA256 over the manifest digest, and encryption is AES-256-GCM over the payload. The manifest names the keys by identifier alone; key bytes are supplied at the command line and are never written into a bundle or printed.
verify checks the manifest version, the payload digest, every record checksum and, when keys are supplied, the signature and decryption, before anything is trusted. Tests flip a byte in a record, tamper with the manifest, truncate the payload, supply an unsupported version and duplicate record ids, and check that each is rejected as a whole. restore verifies first, then writes the records into the target project with their ids re-scoped, in atomic batches. By default it refuses a target project that already holds records, and a scan failure while reading the source or the target stops the operation instead of producing a partial bundle or a preflight that reported success.
Secrets are never carried. Entities of secret kinds are dropped, attributes whose names look like secrets are replaced with a redaction marker, and the manifest lists raw secrets, external provider credentials and file object bytes as excluded, so a restore can tell what must be re-provisioned.
push verifies the local bundle, captures it into a private snapshot, verifies that snapshot, then uploads the payload first and the manifest last, so the manifest is the publication marker. A failed or ambiguous manifest upload is reported as a failure, never as success. pull requires verification keys, enforces a size ceiling before buffering the object, verifies the download in a private staging directory, and publishes it locally when verification succeeded, without overwriting an existing destination. Transport errors never carry provider response bodies or credentials. The object store is configured with the KYNETRA_S3_* settings.
Where you reach it
- CLI
kynetra backup create --project <id> --out <dir> [--sign-key-id --sign-key-hex] [--enc-key-id --enc-key-hex] - CLI
kynetra backup verify --bundle <dir>; kynetra backup restore --bundle <dir> --project <id> - CLI
kynetra backup push --bundle <dir> --prefix <p>; kynetra backup pull --prefix <p> --bundle-id <id> --out <dir>
Example
kynetra --data ./.kynetra backup create --project acme --out ./acme.bundle \
--sign-key-id sign-1 --sign-key-hex "$SIGN_KEY_HEX" \
--enc-key-id enc-1 --enc-key-hex "$ENC_KEY_HEX"
kynetra --data ./restored backup restore --bundle ./acme.bundle --project acme \
--sign-key-id sign-1 --sign-key-hex "$SIGN_KEY_HEX" \
--enc-key-id enc-1 --enc-key-hex "$ENC_KEY_HEX"Limits
- A bundle holds one project, not a whole instance, and file object bytes are not included. A restore reports what was excluded.
- Keys are supplied as command-line values of 64 hex characters. Pass them from a secrets manager through your shell rather than typing them into shared terminals.
- These commands operate on a local data directory. Run them against a stopped server or a copy of the data directory.
- The commands are operator-driven, one bundle at a time. Scheduling and point-in-time restore are the backup chain entry.
- An unsigned bundle is checked for integrity but not for authenticity. Sign bundles that cross a trust boundary.
- The object-store transport is tested against an in-memory fake backend in the engine repository, not against a live provider.
Evidence
- On this siteReliability: partial-backup finding
- TestsCovered in the engine repository by 18 bundle tests (checksums, signature, tampering, truncation, version refusal, secrets canary, encryption, project isolation, large restores, non-empty target), 35 transport tests (upload order, ambiguous manifest, size ceilings, staging, no credential echo), 9 path-traversal tests and 3 scan-failure tests
Test coverage is listed as present in the engine repository at this edition. This page does not report test results.
KynetraDB is in private preview
Request a preview to try this against your own workload.