check

package
v0.6.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendReport

func AppendReport(path string, result *Result) error

AppendReport appends a single check result to a JSONL report file.

Types

type Result

type Result struct {
	Path            string
	ReferencePath   string `json:",omitempty"`
	IntegrityOK     bool
	IntegrityErrors []string     `json:",omitempty"`
	SchemaOK        *bool        `json:",omitempty"` // nil when no reference given
	SchemaDiff      *diff.Result `json:",omitempty"`
	DataOK          *bool        `json:",omitempty"` // nil when --data not requested
	Tables          []TableStat  `json:",omitempty"`
	Passed          bool
}

Result holds the outcome of a backup integrity check.

func Check

func Check(backupPath, referencePath string, withData bool) (*Result, error)

Check runs integrity checks on the backup database. If referencePath is non-empty, also compares schema against it. If withData is true, also compares row counts per table.

type TableStat

type TableStat struct {
	Name       string
	BackupRows int64
	RefRows    int64 `json:",omitempty"`
	RowsMatch  *bool `json:",omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL