Backup and Restore Proof for SQLite Services

    1

    WAL-safe encrypted backups that prove they restore before reporting success, with a hardened systemd timer, an isolated restore verifier and an offsite copier that ships ciphertext only. Node 22.5+, no packages.

    $29

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Backup and Restore Proof for SQLite Services

    Example session with this skill installed

    Set up nightly encrypted backups for our service's SQLite database and its blobs directory (table documents, files named <id>.enc), prove the first backup restores, and schedule it with systemd.

    • Read your context and instructions
    • Compiled the backup and restore

    Summary

    First archive written, decrypted, integrity-checked and inventoried before success was reported. The timer is enabled; the key is in /etc/app-backup/backup-key and must be copied offline now.

    CheckResult
    Unit tests on this host10 pass, 0 fail
    Snapshotbackup() API, integrity_check ok (WAL rows included)
    Rows / live / blobs copied1,291 / 1,284 / 1,284 (7 soft-deleted rows, no alarm)
    Missing blobsnone
    Restore testpassed: 1,284 blobs back, integrity_check ok
    Archiveapp-20260504T034012Z.tar.gz.enc (412 MB, AES-256-GCM, mode 0600)
    Receiptapp-20260504T034012Z.tar.gz.enc.json
    Retention14 archives, floor 1
    Timerapp-backup.timer 03:40 UTC, randomized 10 min, persistent
    {"ok":true,"command":"create","format":"EBKP1","fileRows":1291,"liveFiles":1284,"restoredBlobs":1284,"missingInArchive":[],"integrityCheck":"ok","restoreTest":"passed","blobsCopied":1284,"missingBlobs":[],"retained":1}
    

    Unit hardening: ProtectSystem=strict, ProtectHome=yes, PrivateTmp=yes, PrivateNetwork=yes, NoNewPrivileges=yes, ReadWritePaths=/var/backups/app, ReadOnlyPaths=/var/lib/app /var/lib/app/blobs, key via LoadCredential=backup-key.

    Next steps

    • Copy /etc/app-backup/backup-key to the offline password manager and record where; without it every archive is unreadable.
    • Configure rclone hot, cold and read-only verify remotes, then add a second timer running offsite-copy.sh after 04:00.
    • Run the monthly drill with verify-restore.sh from an offsite copy and keep the receipt.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A cp of a live SQLite database in WAL mode is a torn read that still opens, and a backup nobody has restored is a hope. This skill does the backup properly and proves each archive restores before it reports success.

    Scripts (Node 22.5+, no packages)

    • backup.mjs: online snapshot through node:sqlite backup(), integrity_check, blobs of live rows only (soft-deleted rows never raise a false alarm; a live row with no blob on disk fails the run but keeps the archive as the best copy of what remains), streamed tar through AES-256-GCM with the key read from a file or systemd LoadCredential (never an env var), every archive decrypted and inventoried before success, a JSON receipt per archive, retention that never prunes the last archive, half-written archives deleted on failure.
    • backup-cli.mjs: create, verify <archive>, restore <archive> <empty-dir>; one JSON line, non-zero on failure so a broken backup is a failed unit.
    • backup.test.mjs: 10 tests (WAL capture, soft delete, vanished blob, no plaintext in the archive, wrong key, tampering, non-empty restore refusal, retention floor, no half-written archive).
    • install-backup-timer.sh: runs the tests first, generates a key only if none exists (regenerating would orphan every archive), hardened oneshot unit (ProtectSystem=strict, PrivateNetwork, read-only data paths), timer, first run.
    • verify-restore.sh: isolated restore drill: sidecar hash required, refuses workspaces under live paths, refuses tars with absolute paths, .., links or special files, quick_check on every database, hashed manifest, receipt JSON.
    • offsite-copy.sh: rclone hot (daily) and cold (monthly) tiers; uploads only *.tar.gz.enc and .sha256 sidecars; refuses archives whose receipt lacks a passed restore test; verifies through a separate read-only remote; hot retention.

    References

    Design notes (archive format, key handling, the two kinds of missing blob, why the restore test is mandatory) and a monthly restore drill with a record template.

    Requirements

    Tested on Linux and Windows. Network: none, except the rclone remotes you configure for offsite.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    One SQLite database per archive. Blob inventory assumes one table and id-based filenames. Installer requires systemd. Not legal advice.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 19 days ago

    Software
    Node.js 22.5+tarsystemd (timer installer, Linux only)rclone (offsite copies only)

    Permissions

    Terminal / Shell
    Write Files
    Read Files
    Network Access

    Shell runs node, tar, sha256sum, systemctl (installer) and rclone (offsite). Read files: the live SQLite database, blob directory and the key file you configure. Write files: the archive directory, receipts, systemd unit files (installer) and the scratch restore directory. Network: only offsite-copy.sh, to the rclone remotes you name. The key is read from a file or LoadCredential, never an environment variable.

    Listed19 days ago

    What's inside

    Frequently Asked Questions

    Unlike standard tools that only confirm a file was written, this skill requires a successful decryption and extraction drill in a scratch space before it reports a 'Success' status, preventing the discovery of corrupted archives during an actual emergency.

    The skill requires Node.js 22.5 or higher and a Linux environment with systemd. It uses native modules for performance but relies on system utilities like tar, rclone, and sha256sum for file handling and offsite transport.

    Yes, the system is designed for live environments; it utilizes the node:sqlite backup API and WAL (Write-Ahead Logging) capture to create consistent snapshots without requiring you to take your application offline.

    You receive the core backup/restore CLI, a configuration suite for defining your data mappings, a local test suite for pre-deployment validation, and a hardened systemd installer for automation.

    The skill uses AES-256-GCM encryption via node:crypto to secure all archives. This ensures that filenames, metadata, and database content remain completely unreadable to your offsite storage provider.

    New in APIs & Backend