Protect PostgreSQL instances and databases
Use the following procedure for subscribing a protection plan to PostgreSQL instance and database. When you subscribe an asset to a protection plan, you assign predefined backup settings to the asset.
Note:
The RBAC role assigned to a user must have access to the assets that you want to manage and also to the protection plans you want to use.
To protect a PostgreSQL instance or database:
- On the left pane, click PostgreSQL.
- On the Instances tab or Databases tab, click the box for the instance or the database and click Add protection.
- Select a protection plan and click Next.
- You can edit one or more of the following settings:
Schedules and retention
Change when backups occur and the backup start window.
Schedules:
Full: Complete instance backup using snapshot, pg_basebackup, pg_dumpall, or pgbackrest and completes database-backup using pg_dump utility.
Differential Incremental: Based on the previous backup timestamp, NetBackup identify the changed set of transaction logs (WAL files) and perform its backup.
Backup options
Adjust the Database options like Job limit and Backup method.
Snapshot: This option is used to take the snapshot of an instance. For Windows - VSS snapshot method is used. For Linux - LVM snapshot method is used.
pg_basebackup: This utility of PostgreSQL performs the backup of an instance. It is recommended in the case of non-LVM deployment.
pg_dumpall: This utility of PostgreSQL performs logical backup of instance. It is recommended in the case of non-LVM deployment.
pg_dump: This utility of PostgreSQL performs logical backup of an individual database.
pgbackrest: It is an utility which performs physical backup of an instance using an NFS share of existing NetBackup deduplication pool (MSDP) on Linux platform only.
Ensure the following:
pgbackrest utility is compatible with the PostgreSQL installed.
MSDP storage is configured. For more information, see NetBackup Deduplication guide > Configuring and managing universal shares > Prerequisites to configure universal shares section.
Binary path of pgbackrest utility must be exported in the path environment variable.
For Linux, use: echo "export PATH=$PATH:<pgbackrest_installation_path>" >> ~/.bashrc
You can configure PG_BACKREST_MAX_PROCESSES environmental variable. See Configure PostgreSQL instance .
Maximum Jobs per client should be set to greater than 1 in primary server.
Media server and storage server should be on Linux Platform only.
SpanFS storage unit is NOT supported.
Note:
In the case of snapshot-based backups, it is recommended to keep the archive directory and the data directory in separate locations.
Note:
If a PostgreSQL instance has tablespaces configured, then use
pg_dumpallbackup method. In the case ofpg_dumpallandpg_dumpbackup method, incremental backups are not supported.
- Click Protect.
Note:
If the PostgreSQL instance is deployed on the root LVM, then Snapshot backup method is not recommended.
In case of cluster deployment of PostgreSQL, instances can be protected of primary or standby node.