@restoreverify/core
v0.2.4
Published
Verify every backup. Recover with confidence. Enterprise-grade database point-in-time recovery (PITR) and verification.
Maintainers
Readme
@restoreverify/core
Core Engine and Interfaces for RestoreVerify.
RestoreVerify is an enterprise-grade, open source database point-in-time recovery (PITR) and verification tool.
This package provides the core types, interfaces, and execution strategies used by all RestoreVerify database adapters. If you are building a custom adapter for a new database, you will need to depend on this package.
Installation
npm install @restoreverify/coreExecution Strategies
RestoreVerify decouples what to execute (the database adapter) from how to execute it (the execution strategy). This package exposes the following strategies:
LocalBinaryStrategy: Runs commands directly on the host machine using Node.jschild_process.DockerExecStrategy: Runs commands inside a Docker container viadocker exec.KubernetesExecStrategy: Runs commands inside a Kubernetes Pod viakubectl exec.SshStrategy: Runs commands on a remote server viassh.
Code Snippet: Using a Strategy
import { DockerExecStrategy } from '@restoreverify/core';
// You can pass this strategy to any RestoreVerify adapter
const strategy = new DockerExecStrategy('my-database-container');
// Under the hood, adapters use it to run commands
const result = await strategy.run('echo', ['"Hello from inside Docker!"']);
console.log(result.stdout);Author
Avisekh Kumar Tewari
GitHub: https://github.com/Avisekh02
