Perform an Online PostgreSQL Backup
Caution: If you have configured high availability, do not perform an online backup at the standby node. For more information about high availability configurations, see High Availability.
You can use the online-pg-backup utility to perform an online backup of the PostgreSQL that contains LCE events and part of the LCE control state. Online backups can be created while LCE and PostgreSQL are running.
The control state online-pg-backup saves does not include all control files, such as policies or plugins. To save all control files, use the port-controlfiles utility.
Before you begin:
-
If this is the first time you are using the online-pg-backup utility, in the command line interface (CLI) in LCE, run the following command to restart PostgreSQL and all LCE daemons:
online-pg-backup --one-time-backup-prep
PostgreSQL and all LCE daemons restart.
To create an online PostgreSQL backup:
-
Log in to LCE via the command line interface (CLI).
-
In the CLI in LCE, run the following command:
online-pg-backup --backup-to <full path of directory>
PostgreSQL creates the backup files.
Note: This step may take 10-45 minutes to run, depending on the size of the backup file (10–20% of activeDb's size at the time backup was taken). Creating online backup files does not cause LCE or PostgreSQL downtime.
What to do next:
- (Optional) Restore the backup file, as described in Restore an Online PostgreSQL Backup.