4 4 3:PostgreSQL Backup
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
Backing up a PostgreSQL single database
Create a new backup task for the backup of the PostgreSQL server.
- From Main Selection -> Tasks -> By clients, select PostgreSQL client and click New backup task. The New backup task window opens.
- Specify the Source with the database name. By selecting the source, the task type and task name are set automatically.
- If required, enter the user name and password to access the database: click the tab Options and enter the following in the Save options field.
- If you want to set encryption, consolidate individual tasks under a specific task group, or assign a task to the schedule click the corresponding tabs in the New backup task window. Note that other options are not available (pre/post backup and restore commands, compressing data).
- If you want to start the newly created task immediately, right-click the name of the task and click Immediate start. If you want to schedule the task, click New schedule under Main Selection -> Scheduling -> Schedules. For details, see Creating a Schedule.
- Once you have configured a schedule, you must create a new backup event for it. Go to Main Selection -> Scheduling -> New Backup Event, click the Parameter tab and select one of the available backup levels. For more information on schedules and related events, see Schedules 4.4.
- A different port can be specified with -a port=<portnumber>, under the tab Options in the Save options field.
-a user=<DB User>,password=<Password DB Users>
Click OK to create the task.
If you have problems with PostgreSQL, check the Troubleshooting Guide.