Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EA04F475E14; Mon, 20 Jan 2003 04:41:14 -0500 (EST) Received: from usenet.otenet.gr (usenet.otenet.gr [195.170.0.4]) by postgresql.org (Postfix) with ESMTP id D1938475E20; Mon, 20 Jan 2003 04:41:13 -0500 (EST) Received: from mail.otenet.gr (roba.otenet.gr [195.170.0.17]) by usenet.otenet.gr (8.12.6/8.12.6) with ESMTP id h0K9eAkK003631; Mon, 20 Jan 2003 11:40:10 +0200 (EET) Received: from confuzio (athei36-d053.otenet.gr [212.205.233.53]) by mail.otenet.gr (8.12.6/8.12.6) with ESMTP id h0K9e7As005073; Mon, 20 Jan 2003 11:40:08 +0200 (EET) Content-Type: text/plain; charset="utf-8" From: Alexandros Perdikomatis Organization: UNKNOWN ORGANIZATION To: "Nigel J. Andrews" Subject: Re: Database backup Date: Mon, 20 Jan 2003 09:37:03 +0200 User-Agent: KMail/1.4.3 Cc: pgsql-help@postgresql.org, "D'Arcy J.M. Cain" , pgsql-interfaces@postgresql.org References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200301200937.03806.menippos@otenet.gr> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/85 X-Sequence-Number: 3585 =CE=A3=CF=84=CE=B9=CF=82 =CE=9A=CF=85=CF=81 19 =CE=99=CE=B1=CE=BD 2003 20:2= 3, =CE=BF/=CE=B7 Nigel J. Andrews =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > On Sun, 19 Jan 2003, Alexandros Perdikomatis wrote: > > =C3=93=C3=B4=C3=A9=C3=B2 =C3=8A=C3=B5=C3=B1 19 =C3=89=C3=A1=C3=AD 2003 = 04:59, =C3=AF/=C3=A7 D'Arcy J.M. Cain =C3=9D=C3=A3=C3=B1=C3=A1=C3=B8=C3=A5: > > > Redirecting to help list as it seems more appropriate. > > > > > > On Saturday 18 January 2003 09:17, Alexandros Perdikomatis wrote: > > > > Question: Am I too stupid to use tar? > > > > > > I'm sure not but you may misunderstand what tar does. Tar is for > > > storing a collection of files into an archive. It expects to find the > > > list of files on the command line in one form or another. If you don= 't > > > write to a file first then all you have is a stream of data, not a > > > file. > > > > > > > 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? > > > > > > What exactly was the problem? You may just have a device selection > > > issue. What system is this on? > > > > Thanks for the reply. > > I think I understand what you mean, I just thought that instead of a fi= le > > input, we could have a pipe input. > > It runs on a SuSE linux 6.4 (you may ask why this old version, I updated > > what was necesary, I like it becouse I have full greek support) and the > > archiver is an old conner DDS-2 scsi tape streamer which is known on the > > operating system as /dev/st0 by the kernel whith a symbolic link to > > /dev/rmt0. When I pg_dump on a file, of cource there's no problem. I > > restore also correctly. > > But I would like to pipe this procces. For example: if we type the > > command: # tar cvf /dev/rmt0 * > > we're going to have all the files in the tree below to the tape. > > How can I pipe the output of the pg_dump to it? > > Well, you could do: > > pg_dump ... > /dev/rmt0 > > or if you want to set block size: > > pg_dump ... | dd of=3D/dev/rmt0 obs=3D1k > > Basically, you're trying to make it too complicated, tar will archive one > file but would you really use something like: > > tar -cf archived-file.tar unarchived-file > > unless the unarchived-file name was generated automatically and it just so > happened that only one file existed at that time? > > If you really do want something tar try cpio instead. Thanks for the information, I should think about piping to dd... thanks aga= in.=20 The idea of cpio looks more interesting becouse we could have a multivolume= =20 archive I suppose. one more time thanks, Alexandros