Search Postgresql Archives

Re: database migration question between different ubuntus and different postgresql server versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 16, 2015 at 06:14:20PM -0400, Octavi Fors wrote:
> at first glance, option 1) seems to me simpler. But does it guarantee
> server version upgrade compatibility?

Yes.  Use the pg_dump from the later postgres, which can read old
versions and generate any output needed for the new version.  It's
just like any other pg_dump otherwise.  

> Could you/someone please provide an example of commands which I could use?

Usually pg_dump [connection options] databasename | psql [connection
options] databasename

For instance, if you wanted from the new machine to dump egdb from the
old machine and restore locally, you could do

pg_dump -U postgres -h 192.0.2.1 -C egdb | psql -U postgres

I recommend reading the pg_dump (and if you like, pg_dumpall) manuals
before proceeding.

A

-- 
Andrew Sullivan
ajs@xxxxxxxxxxxxxxx


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux