Top
Enterprise Postgres 18 for Kubernetes User's Guide

2.3.5 Scheduling Backup from Operator

When creating a FEPCluster, users can obtain scheduled backups by setting up backup definitions. Users can also modify the backup schedule by modifying the Backup custom resource that was created.

A backup definition includes the following:

Backup is taken on master Pod only.

Backup processing is performed by pgBackRest.

Parameter can be set to pgbackrestParams in CR definition.

The maximum number of backup schedules is 5.

See the pgBackRest User's Guide for details on the parameters.

However, some parameters are limited. Details are given below.

2.3.5.1 Important Setting Items

Here are the important parameters for setting pgBackRest. This parameter sets the retention period of backup information. If automatic backup is set and this parameter is not set, the risk of overflowing the backup area increases.

Parameter

Overview of parameters

Setting value

Full Retention Option (repo retention -full)

Specify number of full backups to keep

No default (should be set according to user backup policy)

natural number

Full Retention Type Option (repo retention-full-type)

spec.retention -full Specifies whether the setting is a number of retention days (time) or a number of retention generations (count)

No default (should be set according to user backup policy)

time/count


The following is a sample CR example of changing the backup retention period (How long the PITR is valid) to 30 days after the backup is taken.

apiVersion: fep.fujitsu.io/v1
kind: FEPBackup
metadata:
  name: fepcluster-backup
spec:
  pgBackrestParams: |
    # define custom pgbackrest.conf parameters below to override defaults.
    [global]
    repo-retention-full = 30
    repo-retention-full-type = time
...

2.3.5.2 Parameters that cannot be Set

The following parameters in the pgBackRest Configuration Reference are not configurable.

Parameter

Overview of parameters

Reason

Copy Archive Option (--archive -copy)

Copy the WAL segments needed for consistency to the backup

To use internal fixed values

Check Archive Mode Option (--archive-mode-check)

Check the PostgreSQL archive_mode setting.

Limited to backup from master

Backup from Standby Option (--backup-standby)

Back up from the standby cluster

Limited to backup from master

Stop Auto Option (--stop-auto)

Stops a previously failed backup on a new backup.

Because they are 9.6 not supported in

pgBackRest Command Option (--cmd)

pgBackRest command

To use internal fixed values

SSH client command Option (--cmd-ssh)

Path to ssh client executable

Not using ssh

Compress Option (--compress)

Use File Compression

For obsolete options (Use compresse-type option instead)

Config Option (--config)

pgBackRest configuration file.

To use internal fixed values

Config Include Path Option (--config-include-path)

Path to additional pgBackRest configuration files.

To use internal fixed values

Config Path Option (--config-path)

Base path of pgBackRest configuration files.

To use internal fixed values

Delta Option (--delta)

Restore or Backup with Checksum

For new restores only

Dry Run Option (--dry-run)

Execute a dry-run for the command.

command-line only option

Lock Path Option (--lock-path)

Path where the lock file is stored

To use internal fixed values

Keep Alive Option (--sck -keep-alive)

Enable keep-alive messages on socket connections

To use internal fixed values

Spool Path Option (--spool-path)

Path to store temporary data for asynchronous archive-push and archive-get commands

For automatic determination from FEPCluster CR values

Stanza Option (--stanza)

Defines the stanza.

To use internal fixed values

Console Log Level Option (--log-level-console)

Console Log Level

It is not expected to operate on Pod.

Std Error Log Level Option (--log-level-stderr)

Stderr log level

It is not expected to operate on Pod.

Log Path Option (--log-path)

Log File Destination

For automatic determination from FEPCluster CR values

Repository Host Option (--repo-host)

Repository host for remote operations via SSH

Repository Host is not used

Repository Host Command Option (--repo-host-cmd)

Path of pgBackRest on Repository Host

Repository Host Configuration Option (--repo-host-config)

Repository Host Configuration File Path

Repository Host Configuration Include Path Option (--repo-host-config-include-path)

Repository hosts configuring include path

Repository Host Configuration Path Option (--repo-host-config-path)

Repository Host Configuration Path

Repository Host Port Option (--repo-host-port)

Repository host port when "repo-host" is configured

Repository Host User Option (--repo-host-user)

Repository host user when "repo-host" is configured

Repository Path Option (--repo-path)

Path where backups and archives are stored

For automatic determination from FEPCluster CR values

Archive Retention Option (--repo-retention-archive)

The number of consecutive WAL backups to keep.

This option is not recommended, and WAL retention is controlled by the Full Retention Option and Full Retention Type Option.

Archive Retention Type Option (--repo-retention-archive-type)

Backup Type for WAL Retention

It is recommended not to change from the default.

Differential Retention Option (--repo-retention-diff)

Number of incremental backups to keep

No incremental backups

Archive Mode Option (--archive-mode)

Retains or disables the archive for the restored cluster.

To use internal fixed values

Exclude Database Option (--db-exclude)

Restore excluding the specified databases.

To restore the entire FEP cluster, including all databases

Include Database Option (--db-include)

Restore only the specified database

To restore the entire FEP cluster, including all databases

Link All Option (--link-all)

Restore all symbolic links.

To use internal fixed values

Link Map Option (--link-map)

Changes the destination of a symbolic link.

To use internal fixed values

Recovery Option Option (--recovery-option)

Setting options in postgreSQL recovery.conf

To use internal fixed values

Tablespace Map Option (--tablespace-map)

Restoring tablespace to a specified directory

For automatic determination from FEPCluster CR values

Map All Tablespaces Option (--tablespace-map-all)

Restores all tablespaces to the specified directory

No tablespace required because there is only one tablespace per FEPCluster

TLS Server Address Option (--tls-server-address)

TLS server address.

TLS server not used

TLS Server Authorized Clients Option (--tls-server-auth)

TLS server authorized clients.

TLS Server Certificate Authorities Option (--tls-server-ca-file)

TLS server certificate authorities.

TLS Server Certificate Option (--tls-server-cert-file)

TLS server certificate file.

TLS Server Key Option (--tls-server-key-file)

TLS server key file.

TLS Server Port Option (--tls-server-port)

TLS server port.

PostgreSQL Database Option (--pg-database)

PostgreSQL database.

To use internal fixed values

PostgreSQL Host Option (--pg-host)

PostgreSQL host for remote operations via SSH

No SSH connection required

PostgreSQL Host Command Option (--pg-host-cmd)

Path of pgBackRest exe on the PostgreSQL host

To use internal fixed values

PostgreSQL Host Configuration Option (--pg-host-config)

Path of the pgBackRest configuration file

To use internal fixed values

PostgreSQL Host Configuration Include Path Option (--pg-host-config-include-path)

Setting pgBackRest on PostgreSQL host include path

To use internal fixed values

PostgreSQL Host Configuration Path Option (--pg-host-config-path)

Path to configure pgBackRest on the PostgreSQL host

To use internal fixed values

PostgreSQL Host Port Option (--pg-host-port)

SSH Port Specification

No SSH connection required

PostgreSQL Host User Option (--pg-host-user)

The logon user when hosting PostgreSQL, if pg-host is set.

No SSH connection required

PostgreSQL Path Option (--pg-path)

PostgreSQL data directory.

For automatic determination from FEPCluster CR values

PostgreSQL Port Option (--pg-port)

PostgreSQL Ports

For automatic determination from FEPCluster CR values

PostgreSQL Socket Path Option (--pg-socket-path)

PostgreSQL Unix socket path

For automatic determination from FEPCluster CR values

PostgreSQL Database User Option (--pg-user)

PostgreSQL database user

To use internal fixed values

2.3.5.3 Restricted Parameters

Of the parameters in the pgBackRest Configuration Reference, the following parameters limit the configurable values.

Parameter

Overview of parameters

Possible Values

repoX-gcs-key-type

The type of key file you specify when using Google Cloud Storage

service

2.3.5.4 About Sections in the Config File

In FEPBackup CR, you can write the contents of pgbackrest.conf, but the setting for stanza (Backup space for pgBackRest) is specified internally.

The following sections are not allowed;

[stanza: command] , [stanza]