From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: redirecting output of pg_dump |
Date: | 2007-07-18 10:32:04 |
Message-ID: | 20070718103204.GE17772@a-kretschmer.de |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
am Wed, dem 18.07.2007, um 15:39:01 +0530 mailte Ashish Karalkar folgendes:
> Hello all,
>
> I want to take backup from one server and save it to another machine hard
> drive.
> The backup will be taken through a shell script attached to a cron job.
>
> something like:
>
> pg_dump -d postgres -U postgres -f <IP address of other machine and path to
> save the file on that machine >
>
> is there any way?
Yes, any. For instance:
- you are on the remote machine (which should store the backup)
ssh remote "pg_dump ..." > backup.sql
- you have the pg_dump installed on the backup-machine:
pg_dump -h remote ... > backup.sql
- you are on the server:
pg_dump ... | ssh backup_server "cat - > backup.sql"
(all untested, but should work)
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
From | Date | Subject | |
---|---|---|---|
Next Message | Frank van Vugt | 2007-07-18 11:48:52 | it works, but is it legal to separate schema/table/field references using spaces |
Previous Message | Sim Zacks | 2007-07-18 10:31:26 | Re: unconvertable characters |