Options (4)
-n, --dry-runbooleanPerform a dry run (list files that would be removed without actually doing it)
Example:
pg_archivecleanup {{[-n|--dry-run]}} {{path/to/archive}} {{path/to/walfile}}-x, --strip-extensionbooleanStrip a file extension before deciding deletion
Example:
pg_archivecleanup {{[-x|--strip-extension]}} {{extension}} {{path/to/archive}} {{path/to/walfile}}-b, --clean-backup-historybooleanRemove backup history files too
Example:
pg_archivecleanup {{[-b|--clean-backup-history]}} {{path/to/archive}} {{path/to/walfile}}-d, --debugbooleanEnable debug logging output
Example:
pg_archivecleanup {{[-d|--debug]}} {{path/to/archive}} {{path/to/walfile}}Examples (5)
Clean an archive directory up to a given WAL file
pg_archivecleanup path/to/archive path/to/walfilePerform a dry run (list files that would be removed without actually doing it)
pg_archivecleanup [-n|--dry-run] path/to/archive path/to/walfileStrip a file extension before deciding deletion
pg_archivecleanup [-x|--strip-extension] extension path/to/archive path/to/walfileRemove backup history files too
pg_archivecleanup [-b|--clean-backup-history] path/to/archive path/to/walfileEnable debug logging output
pg_archivecleanup [-d|--debug] path/to/archive path/to/walfilemade by @shridhargupta | data from tldr-pages