Database backup - Mailing list pgsql-interfaces

From Alexandros Perdikomatis
Subject Database backup
Date
Msg-id 200301181617.24700.menippos@otenet.gr
Whole thread Raw
Responses Re: Database backup
List pgsql-interfaces
Hello everybody!

I use postgresql for long time now, all through libpq (wich I think is the
most exciting interface) and everything is fine.

When I wanted to backup the base, I was using: "pg_dump mybase > mybase.pgd"and "cat mybase.pgd|psql mybase" (don't
careabout OIDs) 

I faced some small problems to finalise the conversion settings between
different versions, but at the end everything was fine.

Question: Am I too stupid to use tar?

Some time I had no space on the filesystem to copy all the data in command
mode (pg_dump) so I thought to pipe pg_dump to tar using a scsi tape archiver
as output (/dev/rmt0).
Why doesn't work?

Using just pg_dump we have the output to stdout.
I thought that I missender a parameter or something.
If this is the case, sorry everybody for bothering - I'm just too stupid to
use the pipe to tar. In this case, PLEASE someone drop a line correcting the
syndax for me.

If is not, then we have to thing about piping pg_dump to tape archive.

//a command line view:
# pg_dump mybase|tar cvf /dev/rmt0 - // (and some other versions)
tar: -: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
# tar xvf /dev/rmt0|psql mybase
EOF    // (!!!)
#

after the "EOF" message from psql the database is, of cource, empty.

*****************

thanks,

Alexandros



pgsql-interfaces by date:

Previous
From: "Key88 SF"
Date:
Subject: Re: libpq C library Client Interface - select()
Next
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: Database backup