npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

restoreverify

v0.2.4

Published

Enterprise PostgreSQL point-in-time recovery and restore verification platform

Downloads

781

Readme

RestoreVerify

Verify every backup. Recover with confidence.

RestoreVerify is an enterprise-grade, open source database point-in-time recovery (PITR) and verification tool. It provides a standardized API and CLI to backup, restore, and verify databases securely and reliably.

Build Status npm version License: MIT

Why RestoreVerify?

Most backup tools focus on taking the backup. RestoreVerify focuses on proving you can restore it. It orchestrates the entire lifecycle: backing up the database, spinning up a sandbox environment, restoring the data to a specific point in time, and running verification checks to ensure data integrity.

  • Universal Interface: The exact same CLI and SDK commands work across PostgreSQL, MySQL, MariaDB, and SQLite.
  • Execution Strategies: Run commands locally, inside Docker, or via Kubernetes — the adapter handles the database, the strategy handles the execution.
  • Proof of Recovery: RestoreVerify doesn't just create files; it runs automated restore drills and generates reports.

Supported Databases (v0.2.0)

  • PostgreSQL (12 - 16) - True PITR via pg_basebackup + WAL Archive Replay
  • MySQL (8.0, 8.4) - True PITR via Logical Dump + Binlog Replay
  • MariaDB (10.6, 11.4) - True PITR via Physical Backup + Binlog Replay
  • SQLite (3.x) - Full file backup via Online Backup API

🚀 Quick Start (CLI)

1. Installation

Install the unified restoreverify package globally to use the rv command:

npm install -g restoreverify

2. Verify Environment

Ensure your local environment has the necessary tools (like Docker or DB clients):

rv doctor

3. Create a Backup

Take a backup of your local database. By default, it uses the local execution strategy.

export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
export BACKUP_DIR="/tmp/backups"
export WAL_DIR="/tmp/wal"

rv backup -d postgresql

4. Verify the Backup

Run a restore drill. This will spin up a sandbox environment (e.g., a Docker container), restore the backup, and run verification queries.

rv verify -d postgresql --docker postgres:15 -q "SELECT 1"

💻 SDK Usage (Code Snippets)

RestoreVerify can be consumed programmatically in your own Node.js applications.

Installation

npm install restoreverify

Functions Overview

All database adapters (postgresAdapter, mysqlAdapter, mariadbAdapter, sqliteAdapter) implement the same core interface:

  • backup(config): Backs up the database.
  • restore(config): Restores the database to a specific time.
  • verify(config): Connects to the restored database and executes validation queries.
  • validateBackup(config): Checks backup files on disk for integrity.

Example: Programmatic Backup

import { postgresAdapter, LocalBinaryStrategy, DockerExecStrategy } from 'restoreverify';

async function runBackup() {
  const result = await postgresAdapter.backup({
    connectionString: 'postgresql://postgres:password@localhost:5432/mydb',
    backupDir: '/mnt/backups',
    walDir: '/mnt/wal',
    
    // Run the backup command inside an existing Docker container!
    // Or use `new LocalBinaryStrategy()` to run on the host.
    strategy: new DockerExecStrategy('my-postgres-container')
  });

  if (result.success) {
    console.log(`Backup succeeded! ID: ${result.backupId}`);
  } else {
    console.error('Backup failed:', result.error);
  }
}

runBackup();

Execution Strategies

RestoreVerify decouples what to execute (the database adapter) from how to execute it (the execution strategy).

  • LocalBinaryStrategy: Runs commands directly on the host machine.
  • DockerExecStrategy: Runs commands inside a Docker container via docker exec.
  • KubernetesExecStrategy: Runs commands inside a K8s Pod via kubectl exec.
  • SshStrategy: Runs commands on a remote server via ssh.

Author

Avisekh Kumar Tewari
GitHub: https://github.com/Avisekh02

License

MIT License.