Perform operations on Barman through
pg-backup-api
.
The actual operations are implemented by separate modules. This module only builds the CLI that makes an interface with the actual commands.
Note
See :class:ExitCode` for possible exit codes of this main script.
- class patroni.scripts.barman.cli. ExitCode ( value ) View on GitHub
-
Bases:
IntEnum
Possible exit codes of this script.
- Variables :
-
-
NO_COMMAND – if no sub-command of
patroni_barman
application has been selected by the user. -
API_NOT_OK –
pg-backup-api
status is notOK
.
-
- API_NOT_OK = -2
- NO_COMMAND = -1
- patroni.scripts.barman.cli. main ( ) None View on GitHub
-
Entry point of
patroni_barman
application.Implements the parser for the application and for its sub-commands.
The script exit code may be one of:
-
-
ExitCode.NO_COMMAND
: if no sub-command was specified in the -
patroni_barman
call;
-
-
-
ExitCode.API_NOT_OK
: ifpg-backup-api
is not correctly up and -
running;
-
-
-
Value returned by
run_barman_config_switch()
, -
if running
patroni_barman config-switch
;
-
Value returned by
-
-
Value returned by
run_barman_recover()
, -
if running
patroni_barman recover
.
-
Value returned by
The called sub-command is expected to exit execution once finished using its own set of exit codes.
-