mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
f75ba7db94
Contributed by Cynthia Shang.
217 lines
9.3 KiB
Plaintext
217 lines
9.3 KiB
Plaintext
run 001 - base
|
|
==============
|
|
|
|
> [BACKREST-BIN] version
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
[BACKREST-NAME-VERSION]
|
|
|
|
> [BACKREST-BIN] help
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
[BACKREST-NAME-VERSION] - General help
|
|
|
|
Usage:
|
|
pgbackrest [options] [command]
|
|
|
|
Commands:
|
|
archive-get Get a WAL segment from the archive.
|
|
archive-push Push a WAL segment to the archive.
|
|
backup Backup a database cluster.
|
|
check Check the configuration.
|
|
expire Expire backups that exceed retention.
|
|
help Get help.
|
|
info Retrieve information about backups.
|
|
restore Restore a database cluster.
|
|
stanza-create Create the required stanza data.
|
|
stanza-delete Delete a stanza.
|
|
stanza-upgrade Upgrade a stanza.
|
|
start Allow pgBackRest processes to run.
|
|
stop Stop pgBackRest processes from running.
|
|
version Get version.
|
|
|
|
Use 'pgbackrest help [command]' for more information.
|
|
|
|
> [BACKREST-BIN] help version
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
[BACKREST-NAME-VERSION] - 'version' command help
|
|
|
|
Get version.
|
|
|
|
Displays installed pgBackRest version.
|
|
|
|
> [BACKREST-BIN] help --output=json --stanza=main --repo1-host=backup info
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
[BACKREST-NAME-VERSION] - 'info' command help
|
|
|
|
Retrieve information about backups.
|
|
|
|
The info command operates on a single stanza or all stanzas. Text output is the
|
|
default and gives a human-readable summary of backups for the stanza(s)
|
|
requested. This format is subject to change with any release.
|
|
|
|
For machine-readable output use --output=json. The JSON output contains far
|
|
more information than the text output, however this feature is currently
|
|
experimental so the format may change between versions.
|
|
|
|
Command Options:
|
|
|
|
--output output format [current=json, default=text]
|
|
|
|
General Options:
|
|
|
|
--buffer-size buffer size for file operations [default=4194304]
|
|
--cmd-ssh path to ssh client executable [default=ssh]
|
|
--compress-level compression level for stored files [default=6]
|
|
--compress-level-network compression level for network transfer when
|
|
compress=n [default=3]
|
|
--config pgBackRest configuration file
|
|
[default=/etc/pgbackrest.conf]
|
|
--lock-path path where lock files are stored
|
|
[default=/tmp/pgbackrest]
|
|
--protocol-timeout protocol timeout [default=1830]
|
|
--stanza defines the stanza [current=main]
|
|
|
|
Log Options:
|
|
|
|
--log-level-console level for console logging [default=warn]
|
|
--log-level-file level for file logging [default=info]
|
|
--log-level-stderr level for stderr logging [default=warn]
|
|
--log-path path where log files are stored
|
|
[default=/var/log/pgbackrest]
|
|
--log-timestamp enable timestamp in logging [default=y]
|
|
|
|
Repository Options:
|
|
|
|
--repo-cipher-pass repository cipher passphrase
|
|
--repo-cipher-type cipher used to encrypt the repository [default=none]
|
|
--repo-host repository host when operating remotely via SSH
|
|
[current=backup]
|
|
--repo-host-cmd pgBackRest exe path on the repository host
|
|
[default=[BACKREST-BIN]]
|
|
--repo-host-config pgBackRest repository host configuration file
|
|
[default=/etc/pgbackrest.conf]
|
|
--repo-host-port repository host port when repo-host is set
|
|
--repo-host-user repository host user when repo-host is set
|
|
[default=pgbackrest]
|
|
--repo-path path where backups and archive are stored
|
|
[default=/var/lib/pgbackrest]
|
|
--repo-s3-bucket s3 repository bucket
|
|
--repo-s3-ca-file s3 SSL CA File
|
|
--repo-s3-ca-path s3 SSL CA Path
|
|
--repo-s3-endpoint s3 repository endpoint
|
|
--repo-s3-host s3 repository host
|
|
--repo-s3-key s3 repository access key
|
|
--repo-s3-key-secret s3 repository secret access key
|
|
--repo-s3-region s3 repository region
|
|
--repo-s3-verify-ssl verify S3 server certificate [default=y]
|
|
--repo-type type of storage used for the repository
|
|
[default=posix]
|
|
|
|
Use 'pgbackrest help info [option]' for more information.
|
|
|
|
> [BACKREST-BIN] help --output=json --stanza=main info output
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
[BACKREST-NAME-VERSION] - 'info' command - 'output' option help
|
|
|
|
Output format.
|
|
|
|
The following output types are supported:
|
|
|
|
* text - Human-readable summary of backup information.
|
|
* json - Exhaustive machine-readable backup information in JSON format.
|
|
|
|
current: json
|
|
default: text
|
|
|
|
> [BACKREST-BIN] help check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
[BACKREST-NAME-VERSION] - 'check' command help
|
|
|
|
Check the configuration.
|
|
|
|
The check command validates that pgBackRest and the archive_command setting are
|
|
configured correctly for archiving and backups. It detects misconfigurations,
|
|
particularly in archiving, that result in incomplete backups because required
|
|
WAL segments did not reach the archive. The command can be run on the database
|
|
or the repository host. The command may also be run on the standby host,
|
|
however, since pg_switch_xlog()/pg_switch_wal() cannot be performed on the
|
|
standby, the command will only test the repository configuration.
|
|
|
|
Note that pg_create_restore_point('pgBackRest Archive Check') and
|
|
pg_switch_xlog()/pg_switch_wal() are called to force PostgreSQL to archive a
|
|
WAL segment. Restore points are only supported in PostgreSQL >= 9.1 so for
|
|
older versions the check command may fail if there has been no write activity
|
|
since the last log rotation, therefore it is recommended that activity be
|
|
generated by the user if there have been no writes since the last WAL switch
|
|
before running the check command.
|
|
|
|
Command Options:
|
|
|
|
--archive-check check that WAL segments are in the archive before
|
|
backup completes [default=y]
|
|
--archive-timeout archive timeout [default=60]
|
|
--backup-standby backup from the standby cluster [default=n]
|
|
--online check an online cluster [default=y]
|
|
|
|
General Options:
|
|
|
|
--buffer-size buffer size for file operations [default=4194304]
|
|
--cmd-ssh path to ssh client executable [default=ssh]
|
|
--compress-level compression level for stored files [default=6]
|
|
--compress-level-network compression level for network transfer when
|
|
compress=n [default=3]
|
|
--config pgBackRest configuration file
|
|
[default=/etc/pgbackrest.conf]
|
|
--db-timeout database query timeout [default=1800]
|
|
--neutral-umask use a neutral umask [default=y]
|
|
--protocol-timeout protocol timeout [default=1830]
|
|
--stanza defines the stanza
|
|
|
|
Log Options:
|
|
|
|
--log-level-console level for console logging [default=warn]
|
|
--log-level-file level for file logging [default=info]
|
|
--log-level-stderr level for stderr logging [default=warn]
|
|
--log-path path where log files are stored
|
|
[default=/var/log/pgbackrest]
|
|
--log-timestamp enable timestamp in logging [default=y]
|
|
|
|
Repository Options:
|
|
|
|
--repo-cipher-pass repository cipher passphrase
|
|
--repo-cipher-type cipher used to encrypt the repository [default=none]
|
|
--repo-host repository host when operating remotely via SSH
|
|
--repo-host-cmd pgBackRest exe path on the repository host
|
|
--repo-host-config pgBackRest repository host configuration file
|
|
[default=/etc/pgbackrest.conf]
|
|
--repo-host-port repository host port when repo-host is set
|
|
--repo-host-user repository host user when repo-host is set
|
|
[default=pgbackrest]
|
|
--repo-path path where backups and archive are stored
|
|
[default=/var/lib/pgbackrest]
|
|
--repo-s3-bucket s3 repository bucket
|
|
--repo-s3-ca-file s3 SSL CA File
|
|
--repo-s3-ca-path s3 SSL CA Path
|
|
--repo-s3-endpoint s3 repository endpoint
|
|
--repo-s3-host s3 repository host
|
|
--repo-s3-key s3 repository access key
|
|
--repo-s3-key-secret s3 repository secret access key
|
|
--repo-s3-region s3 repository region
|
|
--repo-s3-verify-ssl verify S3 server certificate [default=y]
|
|
--repo-type type of storage used for the repository
|
|
[default=posix]
|
|
|
|
Stanza Options:
|
|
|
|
--pg-host postgreSQL host for operating remotely via SSH
|
|
--pg-host-cmd pgBackRest exe path on the PostgreSQL host
|
|
--pg-host-config pgBackRest database host configuration file
|
|
[default=/etc/pgbackrest.conf]
|
|
--pg-host-port postgreSQL host port when pg-host is set
|
|
--pg-host-user postgreSQL host logon user when pg-host is set
|
|
[default=postgres]
|
|
--pg-path postgreSQL data directory
|
|
--pg-port postgreSQL port [default=5432]
|
|
--pg-socket-path postgreSQL unix socket path
|
|
|
|
Use 'pgbackrest help check [option]' for more information.
|