patroni.scripts.barman.recover module
Implements patroni_barman`
+ ``+recover` sub-command.
Restore a Barman backup to the local node through pg-backup-api
.
This sub-command can be used both as a custom bootstrap method, and as a custom create replica method. Check the output of --help
to understand the parameters supported by the sub-command. --datadir
is a special parameter and it is automatically filled by Patroni in both cases.
It requires that you have previously configured a Barman server, and that you have pg-backup-api
configured and running in the same host as Barman.
Refer to ExitCode
for possible exit codes of this sub-command.
- class _patroni.scripts.barman.recover.ExitCode(_value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None) View on GitHub
-
Bases:
IntEnum
+ Possible exit codes of this script. + - patroni.scripts.barman.recover.restore_backup(_api: PgBackupApi, barman_server: str, backup_id: str, ssh_command: str, data_directory: str, loop_wait: int) → int View on GitHub
-
Restore the configured Barman backup through
pg-backup-api
. + NoteIf requests to `+pg-backup-api+` fail recurrently or we face HTTP errors, then exit with link:#patroni.scripts.barman.recover.ExitCode.HTTP_ERROR[`+ExitCode.HTTP_ERROR+`]. + Parameters:;; Returns:;; the return code to be used when exiting the `+patroni_barman+` application. Refer to link:#patroni.scripts.barman.recover.ExitCode[`+ExitCode+`].
- patroni.scripts.barman.recover.run_barman_recover(api: PgBackupApi, args: Namespace) → int View on GitHub
-
Run a remote
barman`
+ ``+recover` through thepg-backup-api
. +- Parameters:
- Returns:
-
the return code to be used when exiting the
patroni_barman
application. Refer toExitCode
.
© Copyright 2015 Compose, Zalando SE. Revision 9d231aee
.
Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
+ Builds