I tried to pg_dump
from aws ec2
to local postgres. I run command below, and I encountered version mismatch
error.
pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
pg_dump: server version: 9.4.1; pg_dump version: 9.3.6
pg_dump: aborting because of server version mismatch
I found out that ubuntu server has 9.3
postgres and ec2 has 9.4
.
To solve this problem, I have to upgrade ubuntu postgres to 9.4
.
Upgrade 9.3
to 9.4
article is Here in my blog.
After upgrade postgres 9.3 to 9.4 (eqauls to aws postgres), you can pg_dump
data.
If you not remove existing
9.3
postgres, yourpg_dump
command version is still9.3.x
. If so, you can make symbolic link in/usr/bin
sudo ln -s /usr/lib/postgresql/9.4/bin/pg_dump /usr/bin/pg_dump --force
'backend > sql (postgres)' 카테고리의 다른 글
Django: connect to mysql with django (0) | 2018.04.19 |
---|---|
Postgres: how to upgrade 9.3 to 9.4 in ubuntu 14.04 (0) | 2018.04.18 |
Postgres: ubuntu 14.04 에서 password 없이 postgres 접속 (0) | 2018.04.02 |
RDS에서 로컬로 postgres pg_dump해서 데이터 가져오기 (0) | 2018.03.16 |
MySQL: install mysql in mac (0) | 2018.02.25 |