> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Xinproof Verifies Database Backups with Cryptographic Receipts
- URL: https://www.stirup.si/xinproof-verifies-database-backups-with-cryptographic-receipts-5a633487/
- Published: 2026-11-20T08:07:56.000Z
- Updated: 2026-11-20T08:07:56.000Z
- Description: Xinproof verifies database backups using cryptographic receipts signed with Ed25519 over RFC 8785 canonical JSON, ensuring integrity and traceability through hash-chained receipts.
- Author: Satish Das
- Tags: Community, News, Stirup Research

## Backup Verification and Receipt Signing

Xinproof offers a method to verify whether database backups can actually be restored, providing a signed receipt that can be independently verified. Each backup generates a receipt signed using Ed25519 over RFC 8785 canonical JSON, ensuring cryptographic integrity. The receipt includes details such as the source, size, SHA-256 hash, format, dump version, sandbox image (pinned by digest), result, reason, checks performed, timings, and a reference to the previous receipt in a hash chain. This approach allows for a verifiable history of backups, ensuring transparency and accountability without exposing sensitive data like row contents. The system emphasizes security and traceability by recording every restored table with its exact row count, using only names and counts for privacy. Each receipt is hash-chained to the previous one, creating an immutable log of backup verification results.

## Supported Backup Formats and Checks

Xinproof supports a wide range of backup formats, including PostgreSQL's pg\_dump (custom, tar, directory, and plain SQL), MySQL and MariaDB's mysqldump output, and MongoDB's mongodump --archive. It identifies backups by content and handles compressed files using gzip, zstd, or lz4\. Xinproof performs multiple checks, such as row audit, which compares the exact row count of every table with the dump's contents, and index integrity checks using Postgres amcheck and MySQL CHECK TABLE. It also generates a SHA-256 schema hash for consistency across formats. Users can define custom SQL checks, like verifying recent orders or ensuring no orphaned records, which run in a sandbox after a successful restore. These checks help ensure the reliability and completeness of database backups.

## Custom Checks and Error Handling

Xinproof allows users to define custom checks during the database backup restoration process, with each check recorded in the receipt as an `l3.custom check` containing a name and value or error (limited to 200 characters). These checks are skipped (marked as `skip`) if the restore does not pass, particularly for MongoDB backups, which are not SQL-based. If a restore run is interrupted—via Ctrl-C or SIGTERM—the current restore is halted, the sandbox is removed, and every backup not yet tested is marked as `ERROR` in the receipt. This approach ensures that users receive detailed feedback on the status of each backup, even in the event of an interruption.

## Deployment and Execution

Deployment and execution of Xinproof involve using Docker or building from source. When using Docker, the image requires access to the host's Docker socket to restore backups in sibling containers. This is achieved with the command: `docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "$PWD/receipts:/work/receipts" -v "$HOME/.xinproof:/root/.xinproof" ghcr.io/praxin/xinproof verify s3://bucket/prefix/`. For source builds, the Go version is specified in `go.mod`, and the binary is compiled with `go build -o bin/xinproof ./cmd/xinproof`. Releases are triggered by pushing a `v*` tag, and a manual run of the workflow in `.github/workflows/release.yml` performs a dry run that builds and smoke-tests everything without publishing. For Azure, the Storage Blob Data Reader role on the container or a SAS token with read and list permissions is required (tested).

## Exit Codes and Key Management

Xinproof uses exit codes to communicate the status of database backup verification: 0 indicates all tests passed, 1 means any test failed, 2 signals an error with no failures (such as 'no backups found'), and 3 denotes a usage error. On first run, Xinproof generates an Ed25519 key pair in the default directory, which can be customized using the XINPROOF\_HOME environment variable. During verification, Xinproof checks the digital signature and ensures the link to the previous receipt is valid, either by providing it on the command line or locating it as receipt-.json adjacent to the current receipt file.

## Sources and reporting notes

- [Hacker News Show](https://github.com/praxin/xinproof?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.