pg_dump
am 10.10.2005 07:30:07 von Nirav Parikh
This is a multi-part message in MIME format.
------_=_NextPart_001_01C5CD5B.39D65A3A
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
I am trying to write cronjob so it will backup database everynight on
another machine.=20
Currently is doing it on the same machine with this script.=20
=20
20 13 * * * pg_dump -F c -f /root/database.pgdump database
=20
How can I send it to different machine. Machine IP address is
192.168.1.13
=20
Is it possible to write pg_restore job ones it finishes dumping on that
machine?
=20
Does anybody know how to do this?
Thanks in Advance.
=20
=20
Regards,
Neo=20
------_=_NextPart_001_01C5CD5B.39D65A3A
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
charset=3Dus-ascii">
size=3D2>Hi,
size=3D2>
I am trying to =
write cronjob so=20
it will backup database everynight on another machine. =
Currently is doing =
it on the=20
same machine with this script.
size=3D2>
20 13 * * * pg_dump -F c -f /root/
class=3D250272405-10102005>database.pgdump
class=3D250272405-10102005>database
class=3D250272405-10102005>
How can I send it =
to different=20
machine. Machine IP address is 192.168.1.13
class=3D250272405-10102005>
Is it possible to =
write=20
pg_restore job ones it finishes dumping on that =
machine?
class=3D250272405-10102005>
Does anybody know =
how to do=20
this?
class=3D250272405-10102005>
Thanks in Advance.
Regards,
size=3D2>Neo=20
------_=_NextPart_001_01C5CD5B.39D65A3A--
Re: pg_dump
am 10.10.2005 08:48:59 von Luca Ferrari
Nirav Parikh's cat, on 10/10/2005 7.30, walking on the keyboard wrote:
> Hi,
>
> I am trying to write cronjob so it will backup database everynight on
> another machine.
> Currently is doing it on the same machine with this script.
>
> 20 13 * * * pg_dump -F c -f /root/database.pgdump database
>
> How can I send it to different machine. Machine IP address is
> 192.168.1.13
You can use ssh to copy the dump file to another machine. Configuring
ssh to use ssh_agent you will not be required to insert a passwrod, thus
you can do it automatically. I guess there's also an option to specify
the password on the command line.
>
> Is it possible to write pg_restore job ones it finishes dumping on that
> machine?
I guess you can write a shell script that checks, periodically, if the
restore file has been copied, then restores it and delete the files
(thus to not restore it infinitely).
Luca
--
Luca Ferrari
fluca1978@infinito.it
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq