Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pg_dump: how to install on Amazon Linux for PostgreSQL 9.5.2?

I used to install and do:

$ sudo yum install -y postgresql94-server postgresql94
$ pg_dump -h name-of-db.us-east-1.rds.amazonaws.com -U user dbName > dump

After RDS upgrade to 9.5.2 I get this:

pg_dump: server version: 9.5.2; pg_dump version: 9.4.5
pg_dump: aborting because of server version mismatch

I can't find a proper package for Amazon Linux

This didn't help me: http://tecadmin.net/install-postgresql-9-5-on-centos/

Can you?

like image 915
Amir Mehler Avatar asked Apr 27 '16 05:04

Amir Mehler


1 Answers

Ok, found it.

(1) Install the repo:

$ sudo rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-ami201503-95-9.5-3.noarch.rpm

- Update: 9.5.2-> 9.5.3 Found the repo here.

(2) Then install the package:

$ sudo yum install postgresql95

Now you can dump your RDS database to a near by ec2 instance!

like image 199
Amir Mehler Avatar answered Sep 20 '22 12:09

Amir Mehler