LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pg_verifybackup

verify the integrity of a base backup of a PostgreSQL cluster

TLDR

Verify a backup
$ pg_verifybackup [backup_dir]
copy
Verify with progress reporting
$ pg_verifybackup -P [backup_dir]
copy
Skip WAL verification
$ pg_verifybackup -n [backup_dir]
copy
Skip data file checksum verification (faster)
$ pg_verifybackup -s [backup_dir]
copy
Use a manifest file from a different location
$ pg_verifybackup -m [/path/to/backup_manifest] [backup_dir]
copy
Verify with WAL files from a separate directory
$ pg_verifybackup -w [/path/to/wal_dir] [backup_dir]
copy

SYNOPSIS

pg_verifybackup [options] backupdir

DESCRIPTION

pg_verifybackup verifies the integrity of a backup taken with pg_basebackup. It checks the backup manifest for completeness and verifies file checksums. Running this after a backup helps ensure recoverability.By default, it also parses any WAL files required to restore from the backup to verify they are present and uncorrupted.

PARAMETERS

-e, --exit-on-error

Exit as soon as a problem is detected, instead of continuing to report all errors.
--ignore=path
Ignore the specified file or directory (relative path) when comparing against the manifest.
-m path, --manifest-path=path
Use the manifest file at the specified path instead of one in the backup root.
-n, --no-parse-wal
Skip parsing write-ahead log data needed for recovery.
-P, --progress
Show progress while verifying checksums. Cannot be used with `--quiet`.
-q, --quiet
Do not print anything when a backup is successfully verified.
-s, --skip-checksums
Skip data file checksum verification. File presence and sizes are still checked.
-w dir, --wal-directory=dir
Parse WAL files from the specified directory instead of `pg_wal` in the backup.

SEE ALSO

Copied to clipboard
Kai