Re: pg_dump

From: Luca Ferrari <fluca1978(at)infinito(dot)it>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump
Date: 2005-10-10 06:48:59
Message-ID: 434A0EDB.9090308@infinito.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)infinito(dot)it

In response to

  • pg_dump at 2005-10-10 05:30:07 from Nirav Parikh

Browse pgsql-admin by date

  From Date Subject
Next Message Hannes Dorbath 2005-10-10 07:28:18 Re: character problem
Previous Message Nirav Parikh 2005-10-10 05:30:07 pg_dump