Обсуждение: redirecting output of pg_dump

Поиск
Список
Период
Сортировка

redirecting output of pg_dump

От
"Ashish Karalkar"
Дата:
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?
 
With regards
ashish...
 

Re: redirecting output of pg_dump

От
Joshua N Pritikin
Дата:
On Wed, Jul 18, 2007 at 03:39:01PM +0530, Ashish Karalkar wrote:
> 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 >

Can you use ssh? For example:

ssh -x nirmalvihar.info pg_dump -F c ppx > `date +%Y%m%d`

--
Make April 15 just another day, visit http://fairtax.org

Re: redirecting output of pg_dump

От
"A. Kretschmer"
Дата:
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

Re: redirecting output of pg_dump

От
"Jayakumar_Mukundaraju"
Дата:
 
Hello ALL,
 
I need one more help also...

I already connected two systems (one is server that is ip address of 172.16.84.76/32,  another is like a client 172.16.85.243/32) this connection is working fine... now i want to connect one more system in to that server (172.16.84.76/32).... The new system IP address is 172.16.82.247/32..  
 
 I inserted the server ip address(172.16.84.76/32)on pg_hba.conf file in new system  same thing  i insereted the ip address(172.16.82.247/32)  in pg_hba.conf file and postgres.conf file in server system also.  If while conect through pgAdmin III the new system shows the error is  "Could not resolve hostname 172.16.84.76/32"(the error comes in new system only).. I think i did some minor mistake only... Kindly give me the solution.
 
 
(The first one is (172.16.85.243) is working fine..)
 
Thanks & Regards
Jayakumar M
09963432764 

 

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..