prorm API Reference
    Preparing search index...

    Class BackupVerification

    Index
    • Register a backup in the system for tracking.

      Parameters

      • metadata: BackupMetadata

        Backup metadata including ID, source, timestamp, etc.

      • source: string = 'primary'

        Source identifier ('primary' or 'secondary')

      Returns void

    • Capture a real row-count snapshot of a live database, intended to be taken at (or immediately before/after) backup time and stored on BackupMetadata.snapshot. This is the "strongest achievable" verification baseline this library can produce without a real restore/import engine: it lets testRestore() report what the backup should contain, even though it cannot prove the backup file itself restores to that state.

      Parameters

      • prorm: Prorm

        A connected Prorm instance to query

      • tables: string[]

        Table names to count rows for

      Returns Promise<{ rowCounts: Record<string, number>; capturedAt: Date }>

      A snapshot with real row counts per table

    • Remove a scheduled verification.

      Parameters

      • backupId: string

        The backup ID to remove schedule for

      Returns boolean

    • Get the current configuration.

      Returns {
          sources: Map<string, BackupSource>;
          staging:
              | {
                  database: string;
                  host: string;
                  port?: number;
                  username: string;
                  password: string;
              }
              | undefined;
          verification: | {
              verifyChecksum?: boolean;
              verifyEncryption?: boolean;
              verifyIntegrity?: boolean;
              minAgeHours?: number;
          }
          | undefined;
          notifications: | {
              onSuccess?: boolean;
              onFailure?: boolean;
              emailRecipients?: string[];
              webhookUrl?: string;
          }
          | undefined;
      }

      Current backup configuration