Date: Mon, 29 Oct 2001 10:00:22 +0100 (CET) From: Nils Holland <nils@tisys.org> To: "Gary W. Swearingen" <swear@blarg.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Funny things to do with tar... Message-ID: <20011029094815.O874-100000@jodie.ncptiddische.net> In-Reply-To: <jn1yjngs1d.yjn@localhost.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Oct 2001, Gary W. Swearingen wrote: > > Note that I made an ISO-fs of each .tar file first, as > > pervious experiences have shown that burning a "raw" .tar file to CD > > causes problems that manifest themselves that during the extraction > > process tar will not be able to detect the end-of-file, so it will abort > > with a lot of read errors once it has reached the end of the first CD. > > So tar's "-L" only works when writing the archive and not when reading? The problem I mentioned above actually had nothing to do with -L. What I was trying to describe is the following issue: When creating a multi-volume tar archive, there are basically two ways to get the multiple parts of the archive on CD. So, let's assume we have the first 650 MB volume on our filesystem in a file called backup.tar. Now we need to get that on the CD. It is possible to do the following: burncd -f /dev/acd1c -s 10 data backup.tar fixate When restoring the archive later, we'd use tar with the -f option pointing directly to the CD-ROM (i.e.: tar -f /dev/acd0c). The problem with this "raw" method is that once the end of the first CD has been reached, tar reports a lot of read errors instead of properly prompting me to inser the next volue. This most likely has do do with the nature of writing raw data to CD, and it can be solved by doing the following: First, create an ISO image from backup.tar with mkisofs. Then, burn that ISO image to CD. When restoring such an archive, the CD will actually have to be mounted (for example at /cdrom) and tar will have to be told to extract from the file on that CD (tar -f /cdrom/backup.tar). This method works fine, tar recognizes the end of each volume and properly prompts me to insert the second one. Note that this way of doing things has some nice implcations when doing it in single user mode: In single user, when the first volume has been restored, you will have to put tar to the background (^Z), then unmount the CD, mount the next CD, put tar to the foreground again (fg %1) and tell it to continue. This does indeed seem to work! Right now, it seems that my original problem was caused by a flawed CD-ROm drive I used during the restore process. I have put one of my backup CDs in that drive and compared the backup.tar on there to the one on my HDD and quite some errors were detected. Using a different CD-ROM drive, everything seemed fine. Greetings Nils Nils Holland Ti Systems - FreeBSD in Tiddische, Germany http://www.tisys.org * nils@tisys.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011029094815.O874-100000>