pg_rman install issues

pg_rman is a tool to take incremental backups on Postgres. Although I do not see any recent development on this tool since june 2011. I somehow wanted to try installing it and try to use it in a test environment to  justify its usage. I was facing some issues when I tried to install it and somehow could not find an answer to the errors I saw during installation.

pg_ram can be downloaded from here.

Once downloaded just untar using:

tar -xvzf pg_rman-1.2.4.tar.gz

cd pg_rman-1.2.4

sudo make USE_PGXS=1

Got the following error message and started looking at google for help. All I could find is set your PATH for postgres binaries. Which I saw was correct. The issue seemed to me that the pg_rman Makefile would not find pg_config.

Also you should ensure that you have the postgresql-devel package installed as that’s the one that gets the pg_config in there.

make: pg_config: Command not found
cc -c -o backup.o backup.c
In file included from backup.c:10:0:
pg_rman.h:12:25: fatal error: postgres_fe.h: No such file or directory
compilation terminated.
make: *** [backup.o] Error 1

I then modified the Makefile with the full path to the pg_config and it just worked. Below is the change:

PG_CONFIG = /opt/PostgreSQL/8.4.9/bin/pg_config  (path to your pg_config could be different. Append it accordingly)


, ,

  1. #1 by Ravi on July 2, 2016 - 10:15 am

    Hi Vikram,
    Can I setup the pg_rman in mac OS X as well or do you have any recommendation tool of postgresql for mac?
    I’m in really need of incremental backup tool of postgresql for mac. At the moment, I went through the basic procedure of installing pg_rman but I’ve been stucking with this error “/Library/PostgreSQL/9.5/include/postgresql/server/c.h:81:10: fatal error:
    ‘stdio.h’ file not found
    #include “.

    Totally no clue how to resolve this problem.
    Any help would be appreciated!


    • #2 by Vikram Rai on July 6, 2016 - 5:45 pm

      Ravi, take a look at barman from 2ndquadrant. You will be able to use that on a mac for incremental backups. Much better solution for backups.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: