Now let’s configure the backup itself.
1. Click the Config button for your PostgreSQL database.
2. You’ll see the configuration manager opened at the bottom of your dashboard with a list of accessible folders.
Navigate to the conf directory, find the pg_hba.conf file in it, and replace its content with the following lines:local all postgres peer
local all all md5
host all all 127.0.0.1/32 trust
host all all ::1/128 md5
In case you’ve chosen PostgreSQL 8, use this code:local all all md5
host all all 127.0.0.1/32 ident
host all all ::1/128 trust
host all all 0.0.0.0/0 md5
Save the changes with the appropriate button above the editor.
3. Then, locate the postgres file in the cron folder. Modify the next command based on your requirements and add it to this file (e.g. the example below will make the backup once per hour).
* */1 * * * pg_dump > /var/lib/jelastic/backup/backup.sql
For PostgreSQL 8 please use the line of the following format:
* */1 * * * pg_dump -h localhost > /var/lib/jelastic/backup/backup.sql
In order to get more information on how to configure the desired frequency of reserve copying, see this article (Setting up cron event scheduler section).
4. Save the made changes and Restart your DB node for their appliance.