SQWareProduction:postgres:etc:sqwpg EnvPgBackrest.cfg

From Wiki_dbSQWare
Jump to navigation Jump to search

Configuration file $gvsqw_PgBin/../etc/sqwpg_EnvPgBackrest.cfg:
Global var for pgbackrest scripts


File content:

#!/bin/bash
###################################################################
# SQWareProduction for Postgres module of dbSQWare
# 
# dbSQWare is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# CGU/CGA for more details.
# 
# You should have received a copy of the CGU/CGA
# along with this program.  If not, see <http://www.dbsqware.com/licenses/>.
# 
# For information : contact@dbsqware.com or www.dbsqware.com
###################################################################
## @Synopsis	Global var for pgbackrest scripts
## @Copyright	Copyright 2007-2025, dbSQWare (www.dbsqware.com)

# /etc/pgbackrest/conf.d/main.conf

export gvsqw_PgBackrestConf=/etc/pgbackrest/pgbackrest.conf
if [ "$lvsqw_BkrMode" = 'Local' ]
then
	export gvsqw_PgBackrestRepoBck=/pgbackup/$PG_SID/PGBACKREST/backup/$PG_SID
	export gvsqw_PgBackrestRepoArc=/pgbackup/$PG_SID/PGBACKREST/archive/$PG_SID
elif [ "$lvsqw_BkrMode" = 'Central' ]
then
	export gvsqw_PgBackrestRepoBck=/backups/pgbackrest/backup/$PG_SID  # default /var/lib/pgbackrest/backup/$PG_SID
	export gvsqw_PgBackrestRepoArc=/backups/pgbackrest/archive/$PG_SID # default /var/lib/pgbackrest/archive/$PG_SID
else
	gfsqw_EndMailError 12 "BkrMode not supported,\nmust be in: Local,Central!\n"
fi

export gvsqw_PgBackresLogLevel=info
export gvsqw_PgBackresLockPath=/tmp/pgbackrest #default: /tmp/pgbackrest