SQWareProduction:postgres:bin:sqwpg PgBackrest.ksh
Presentation
Script $gvsqw_PgBin/sqwpg_PgBackrest.ksh :
Online help
The online help is available for most scripts with the -h option.
Ex: $gvsqw_PgBin/sqwpg_PgBackrest.ksh -h
Content of this assistance :
Sourcing sqwpg_Global.lib v2025.10 SQWareProduction for PostgreSQL (dbSQWare) ...
Usage: sqwpg_PgBackrest.ksh [-h] -I instance -Type type [+ options]
DESCRIPTION
sqwpg_PgBackrest.ksh backup of cluster with pgbackrest
SUPPORT
PostgreSQL supported versions: 9.0 <= v <= 17
Before using this script, you must install pgbackrest utilities on your system !
More information on https://pgbackrest.org/
PARAMETERS
-I instance : Target instance.
-Type type : Type of backup full, diff, incr.
OPTIONS
-h : Display the full usage.
-s : Display samples of usage.
-FRT code : Force return code value on error.
-BkrMode mode : Mode of backup Local or Central (by default, Local)
-AddMail email : Email address to add at 'demo-sqwarebox@dbsqware.com'.
-SendReport : Send execution log report.
-NoMail : Deactivate sendmail on error demo-sqwarebox@dbsqware.com (by default, send on error).
-Locale locale : Force Locale for help display (fr,en).
-Exec : Execute commands (by default, display generated commands).
Error management
Errors passing arguments
This type of message is generated:
Lack 'PG_SID' parameter, Usage: sqwpg_PgBackrest.ksh [-h] -I instance -Type type [+ options] For full help : sqwpg_PgBackrest.ksh -h
If you are connecting through a terminal, no mail will be sent and you will have more this kind of message:
Not sending mail because you are in connected mode !!! Lack 'PG_SID' parameter
If you are not connected to a terminal, the error message appears and is sent by mail to the address contained in the variable $gvsqw_GlobalMail (See help customize this variable). The subject line will always start by "$gvsqw_MailMsg_postgres : " (See help customize this variable).
Execution errors
Whether you are or not connected to a terminal, the error message appears and an email containing a summary of treatment errors is sent to the address contained in the variable $gvsqw_Mail_postgres (See help customize this variable). The subject line will always start by "$gvsqw_MailMsg_postgres : " (See help customize this variable).
Usage examples
Sourcing sqwpg_Global.lib v2025.10 SQWareProduction for PostgreSQL (dbSQWare) ... #Standard help for script sqwpg_PgBackrest.ksh:
