This article describes the steps needed for successful backup of a PostGreSQL database on a Linux server.

The steps below highlight the following:

1) Backup Client is already installed on the Linux server

2) creating a symbolic link to the postgres library

3) configuring a group with correct permissions

4) entering your account details/password, database names, ports, etc to ensure your backup will be configured correctly.


P1.   It is assumed a PostGreSQL Backup Client is installed on the Linux server.

         Cloud Backup - Provisioning Cloud Backup for a Server (step by step)


  1. Open an ssh session to the Linux server in question. Make a connection to the server where your PostGreSQL client is installed [in the example below is the IP address as shown].

  2. To ensure that the PostgresSQL agent works on the system a Symlink needs to be created first between a file to ensure that the backups will work. The Postgres agent is looking for a specific library file and if it does not exist they you will need to perform this step.

    Check to see if the following file exists in the usr/pgsql-9.3/lib directory.Perform the following command to see if this file exists -> “ls”.  Note -> if the file is not there please continue
    cd /usr/pgsql-9.3/lib

    Create the Symbolic link or symlink for short. Type “ln –s” and press enter as shown.


  3. Start postgres service with the below command. 

     service  postgresql-9.3 start
    Once this has been completed you can move onto step 4 below.


  4. Change the directory to the PostGre data folder. example -> cd /var/lib/pgsql/9.3/data

  5. You will need to change the archive settings in the postgresql.conf file using the VI editor
    Enter vi postgresql.conf (this will start the editor)

  6. Enter /archive_command

  7. TypeI for insert mode

  8. Make sure the existing archive_commands have a # symbol in the front as shown here

  9.  Ensure this following line is entered into the conf file -> 

    archive_command = 'cp %p /var/lib/pgsql/9.3/wals/%f'

  10. Press esc to exist insert mode.

    Enter :wq. This will write the postgresql.conf file to disk and exit the VI editor.

  11. Now that this Config file has been changed it is recommended that you create a new group called simpana. This group will be used for all the security involved in performing the backups for the local file system as well as the database. From the command prompt, type groupadd simpana (this will create the group)

  12. Type vi /etc/group

  13.  Press I for insert mode

  14. Go to the following line and make sure that is reads as follows if it does not look like this change it so it looks like below.

  15. Change the directory to the following cd /opt/simpana/installer

  16. Enter this command -> ./cvpkgchg

  17. Enter 1 to select the Change Unix group option.

  18. Press Enter to start the process.

  19. When you are it asked Would you like to assign a specific group to Simpana, enter Yes

  20. For the Group Name, enter simpana

  21. Type Enter to continue

  22. When you are prompted for Would you like to stop Simpana on all instances?, enter Yes
  23. Press Enter to continue

    Press the up arrow key to bring up the previous command -> ./cvpkgchg

  24. Enter 2 to select the Change access permissions option.

    Enter to disable the Allow read permission to other user’s option.


    Enter 5 disable the Allow writepermission to other user’s option.


    Enter 6 disable the Allow executepermission to other user’s option.

  26. Press Enter to continue

    When prompted Would you like to stop Simpana on all instances?, enter Yes

  27. Press Enter to continue


    Now the permissions should be set correctly., to enable a successfull PostGreSQL database backup.




  29. Go to the Cloud Backup agent on your server will be located in /opt/simpana/RestoreClient.

    To launch the application browse to /opt/simpana/RestoreClient and execute the following command.

  30. You'll also see the screen with options available for configuration, restore and Job Status. Select the menu item number 5 below to configure the backup job service.


  31. This will request the SA UserName, Password, and the relevant directories and ports for a PostGreSQL database. Please fill in the details correctly so that your backup/restore jobs will work as expected.



  1. In order to modify the PostGreSQL instance of your backup job, go back to the screen here and select option 6.


  2. re-select the options to modify your backup job.





Related Articles: