Thread: How to transfer from place to plase without backup/restore

How to transfer from place to plase without backup/restore

From
"Hristo Filipov"
Date:

Is it possible to transfer database from one place to another without making backup from the source and restore at the target?

I mean I want to copy the files as they are at the source to the target? What else I must do, so I can attach them to the target PostgreSQL database?

Also I’m creating stored procedure and it is returning me recordset, but I can’t named it, it gets random names – Unnamed Recordset <number>. Is there a way to name give a specific name to this recordset?

 

Hristo Filipov

Re: How to transfer from place to plase without backup/restore

From
Shane Ambler
Date:
Hristo Filipov wrote:
> Is it possible to transfer database from one place to another without making
> backup from the source and restore at the target?
>
> I mean I want to copy the files as they are at the source to the target?
> What else I must do, so I can attach them to the target PostgreSQL database?

That is basically what you are doing when you transfer (unless you are
moving the drive to a new machine) - how you do the transfer will depend
on your needs and what hardware and software is at the source and
destination.

If you are looking for a backup server to be ready to use as soon as
your production server fails then you can look at PITR or
synchronization such as slony-1

If you want to copy your database to a development machine occasionally,
then if they have the same hardware and postgres version then you should
be able to copy the data files across while the production server is
stopped without problems. Some differences between CPU and postgres
version can stop this from working.

You could also do the dump/restore directly from one machine to another
if they are on the same network without having the dump file to transfer
across and import which will give similar results.

eg. instead of -
pg_dumpall > mybackupfile
psql -h my.other.machine.address < mybackupfile

you can -

pg_dumpall | psql -h my.other.machine.address

If you have different cpu's (one Intel and one AMD64) or different
postgres versions then you will have to do the dump/restore even if it
is sent straight from one to another.

For more help specify what hardware, system and postgres version you
have on each machine and what you wish to achieve in transferring.



--

Shane Ambler
pgSQL@Sheeky.Biz

Get Sheeky @ http://Sheeky.Biz

Re: How to transfer from place to plase without backup/restore

From
"Hristo Filipov"
Date:
Hi Shane,
Thanks for the answer.
Actually I want to distribute specific database to a lot of different
clients(different OS/Linux;Windows/, different CPU/AMD;Intel/), and I was
thinking about only copying the files instead of dump/restore(which is must
slower operation). From your answer I guess it is impossible for now :-(.
Is there a way to tell PostgreSQL not install itself with OS or/and CPU
compatibility(for the prize of loosing performance), but that way the one
can move files free from on Computer to another?

Hristo Filipov

-----Original Message-----
From: Shane Ambler [mailto:pgsql@Sheeky.Biz]
Sent: 23 ???????? 2007 11:58
To: Hristo Filipov
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How to transfer from place to plase without
backup/restore

Hristo Filipov wrote:
> Is it possible to transfer database from one place to another without
making
> backup from the source and restore at the target?
>
> I mean I want to copy the files as they are at the source to the target?
> What else I must do, so I can attach them to the target PostgreSQL
database?

That is basically what you are doing when you transfer (unless you are
moving the drive to a new machine) - how you do the transfer will depend
on your needs and what hardware and software is at the source and
destination.

If you are looking for a backup server to be ready to use as soon as
your production server fails then you can look at PITR or
synchronization such as slony-1

If you want to copy your database to a development machine occasionally,
then if they have the same hardware and postgres version then you should
be able to copy the data files across while the production server is
stopped without problems. Some differences between CPU and postgres
version can stop this from working.

You could also do the dump/restore directly from one machine to another
if they are on the same network without having the dump file to transfer
across and import which will give similar results.

eg. instead of -
pg_dumpall > mybackupfile
psql -h my.other.machine.address < mybackupfile

you can -

pg_dumpall | psql -h my.other.machine.address

If you have different cpu's (one Intel and one AMD64) or different
postgres versions then you will have to do the dump/restore even if it
is sent straight from one to another.

For more help specify what hardware, system and postgres version you
have on each machine and what you wish to achieve in transferring.



--

Shane Ambler
pgSQL@Sheeky.Biz

Get Sheeky @ http://Sheeky.Biz


Re: How to transfer from place to plase without backup/restore

From
Alvaro Herrera
Date:
Hristo Filipov wrote:

> Is there a way to tell PostgreSQL not install itself with OS or/and CPU
> compatibility(for the prize of loosing performance), but that way the one
> can move files free from on Computer to another?

No, there isn't.

--
Alvaro Herrera                               http://www.PlanetPostgreSQL.org/
"Uno combate cuando es necesario... ¡no cuando está de humor!
El humor es para el ganado, o para hacer el amor, o para tocar el
baliset.  No para combatir."  (Gurney Halleck)

Re: How to transfer from place to plase without backup/restore

From
"Hristo Filipov"
Date:
Man ... well :-), thanks for the answer. At least I'll stop running against
the wall.

-----Original Message-----
From: Alvaro Herrera [mailto:alvherre@commandprompt.com]
Sent: 06 ??????? 2007 00:11
To: Hristo Filipov
Cc: 'Shane Ambler'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] How to transfer from place to plase without
backup/restore

Hristo Filipov wrote:

> Is there a way to tell PostgreSQL not install itself with OS or/and CPU
> compatibility(for the prize of loosing performance), but that way the one
> can move files free from on Computer to another?

No, there isn't.

--
Alvaro Herrera
http://www.PlanetPostgreSQL.org/
"Uno combate cuando es necesario... ¡no cuando está de humor!
El humor es para el ganado, o para hacer el amor, o para tocar el
baliset.  No para combatir."  (Gurney Halleck)


Re: How to transfer from place to plase without backup/restore

From
anvesh
Date:
It can done through cloud based services like using drop box or google drive.
Happy Rose Day
<http://www.happynewyear2016wishesquotes.com/2016/01/happy-rose-day-2016-whatsapp-status.html>
They have worked like a charm for me.. Happy Chocolate Day
<http://www.ifsusa.net/>   I think there are various number of other 3rd
party applications that have been  Happy Valentines Day Quotes
<http://www.happynewyear2016wishesquotes.com/>   developed in the later
months  Hug Day 2016
<http://www.happynewyear2016wishesquotes.com/2016/01/happy-hug-day-2016-whatsapp-status.html>



--
View this message in context:
http://postgresql.nabble.com/How-to-transfer-from-place-to-plase-without-backup-restore-tp1890462p5884194.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.