agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedFrom: Luca Ferrari <fluca1978@infinito.it>
To: pgsql-admin@postgresql.org
Subject: Re: pg_dump
Date: Mon, 10 Oct 2005 08:48:59 +0200
Message-ID: <434A0EDB.9090308@infinito.it> (raw)
In-Reply-To: <221385EC3F18A44DB0925467A1D2395F38F8D9@exsrv3.workskillsprofessionals.com.au>
References: <221385EC3F18A44DB0925467A1D2395F38F8D9@exsrv3.workskillsprofessionals.com.au>
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
view thread (42+ messages) latest in thread
Message-ID: <434A0EDB.9090308@infinito.it>
Permalink: ../434A0EDB.9090308@infinito.it/
Also on: postgresql.org/message-id/434A0EDB.9090308@infinito.it
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: fluca1978@infinito.it
Subject: Re: pg_dump
In-Reply-To: <434A0EDB.9090308@infinito.it>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox