SEP sesam PostgreSQL module supports two different methods for performing PostgreSQL database backup:
- Using pg_dump utility, which enables performing single database backup and restore operations. For complete database instance backup, this method is supported for the backup level COPY.
- File-level backup involving backing up both the PostgreSQL database data files and the Write Ahead Log (WAL) files. SEP sesam can perform FULL and DIFF level backups for complete database instances when the PostgreSQL database runs in WAL mode. However, in this case single database backup or restore is not supported.
To enable DIFF backups, the PostgreSQL database must run in WAL mode. Activating WAL mode requires restarting the database service.
Granting access to the database
In order for the SEP sesam PostgreSQL Backup module to work correctly, the root user must have access to the database instance.
On modern PostgreSQL setups access can be granted by using the following command:
root@database-system# su - postgres -c "createuser -s root"
This can be verified by listing the available databases on the command line:
root@database-system:~# psql -l
Configuring PostgreSQL database backup
The PostgreSQL database backup process includes FULL backups, which save all DB data files, and DIFF backups, capturing files that were changed since the last FULL backup. Internally, the INCR backup level is reserved and used for saving the Write Ahead Log (WAL) files.
While the SEP sesam PostgreSQL module now offers DIFF/INCR backups, it only supports complete database instance backup and restore. Single database backup or restore is not available with this functionality.
To configure regular PostgreSQL database backup, perform the following steps:
- From Main Selection -> Tasks -> By Clients, select a PostgreSQL client and click New Backup Task. The New Backup Task window opens.
- Select PostgreSQL task type.
- In the Source field enter all, or use the browse button to select what you want to back up.
- Specify the user name (usually postgres instead of root) to access the database. Click the tab Options and enter the following in the Backup options and Restore options fields:
- Configure all other options as required and click OK to save the backup task. For more information refer to Creating a Backup Task.
|To perform single database backup, use the browse button to specify the Source and select the individual database you want to back up. It is recommended to create a separate backup task for each PostgreSQL database. In this case you can add the tasks to a task group and create a backup event for this task group.
In the Backup options field you can also specify a different port with -a port=<port_number> switch.
You can start the backup task immediately with the option Immediate start, or you can create a backup event and associate the task with a schedule for regular or repeated execution. You can select an existing schedule or create a new one. For instructions, see Creating a Schedule.
To create a backup event, navigate to Main Selection -> Scheduling -> Schedules, right-click the appropriate schedule and click New Backup Event. Define the settings and options as required. For more information on creating a backup event, see Creating a Backup Event.
You can monitor the status of your backup jobs. In Web UI navigate to Monitoring -> Last Backup State or Backups and review the job results. The backup status overview provides information about the last run of backup jobs, including the task name, start and stop time of the last backup, backup level, data size, throughput, assigned media pool, etc. You can also open and review details of the backup job or backup task.