Обсуждение: Moving the database from winxp to linux

Поиск
Список
Период
Сортировка

Moving the database from winxp to linux

От
"Tomas Lanczos"
Дата:
I am planning within few week to migrate the existing 8.1.4 postgresql
database from winxp to 8.2 postgresql installed on linux (ubuntu). Is there
any good tutorial for the task like this, event. do have somebody summarized
some tricks and tips, at least?

many thanks in advance and regards

Tomas


Re: Moving the database from winxp to linux

От
Chris
Дата:
Tomas Lanczos wrote:
> I am planning within few week to migrate the existing 8.1.4 postgresql
> database from winxp to 8.2 postgresql installed on linux (ubuntu). Is there
> any good tutorial for the task like this, event. do have somebody summarized
> some tricks and tips, at least?
>
> many thanks in advance and regards

If it's just one database, then use pg_dump
(http://www.postgresql.org/docs/current/static/app-pgdump.html) to
create a database dump, then you can pipe it into psql:

psql < /path/to/dumpfile.

or use pg_restore
(http://www.postgresql.org/docs/current/static/app-pgrestore.html).

If you want to move the whole system, use pg_dumpall to dump all databases.

http://www.postgresql.org/docs/current/static/app-pg-dumpall.html

--
Postgresql & php tutorials
http://www.designmagick.com/

Re: Moving the database from winxp to linux

От
"Tomas Lanczos"
Дата:
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris
>
> Tomas Lanczos wrote:
> > I am planning within few week to migrate the existing 8.1.4
> postgresql
> > database from winxp to 8.2 postgresql installed on linux
> (ubuntu). Is
> > there any good tutorial for the task like this, event. do have
> > somebody summarized some tricks and tips, at least?
> >
> > many thanks in advance and regards
>
> If it's just one database, then use pg_dump
> (http://www.postgresql.org/docs/current/static/app-pgdump.html
> ) to create a database dump, then you can pipe it into psql:
>
> psql < /path/to/dumpfile.
>
> or use pg_restore
> (http://www.postgresql.org/docs/current/static/app-pgrestore.html).
>
> If you want to move the whole system, use pg_dumpall to dump
> all databases.
>
> http://www.postgresql.org/docs/current/static/app-pg-dumpall.html
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/

Thanks. No complications due the move to the higher version (8.2)?

Tomas


Re: Moving the database from winxp to linux

От
Ireneusz Pluta
Дата:
Tomas Lanczos napisał(a):
>
> Thanks. No complications due the move to the higher version (8.2)?
>
> Tomas
>
Per usual remarks about upgrading found in installation instructions of
every release, you will need to use pg_dump that comes with the new
version to connect to the old database and run your dump, to make sure
the dump is compatible with the new version. Consult the -i option of
pg_dump. Just make a try having the new server ready. I guess you are in
a quite comfort situation because you seem to be able to run the two
machines simultaneously for a while. Be sure to use 8.2.1, just released.

Irek.