From owner-freebsd-questions Sat Jul 6 21:54: 1 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D688637B400 for ; Sat, 6 Jul 2002 21:53:56 -0700 (PDT) Received: from zim.0x7e.net (zim.0x7e.net [203.38.184.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6E9843E31 for ; Sat, 6 Jul 2002 21:53:54 -0700 (PDT) (envelope-from listone@deathbeforedecaf.net) Received: from goo.0x7e.net ([203.38.184.164] helo=goo) by zim.0x7e.net with smtp (Exim 3.33 #1) id 17R44g-000K4q-00; Sun, 07 Jul 2002 14:25:06 +0930 Message-ID: <000601c22572$50fd4430$a4b826cb@goo> From: "Rob" To: "Doug Hardie" Cc: References: <000e01c22501$26e349e0$a4b826cb@goo> Subject: Re: Backups to CD-R - problems with filesystems Date: Sun, 7 Jul 2002 14:24:02 +0930 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 7 July 2002, Doug Hardie wrote: > At 0053 +0930 7/7/02, Rob wrote: > >I've had a few adventures in recent days trying to make CD-R backups. In > >case I've gone down a complete dead-end, here's the objective: > > > >* Copy selected directory trees from 3 FreeBSD systems onto CD as a > > mountable filesystem (not a monolithic archive) > > > >The first challenge was to get the files onto 1 machine (with a CD burner). > >I tried piping tar through ssh > > > > goo# ssh gir 'cd / ; tar -cf - boot etc home usr/local/etc' | > > ( cd gir && tar -xpf - ) > > > >but discovered that it misbehaves when the users in a tarfile don't exist > >on the destination machine. Instead of leaving the files with numeric > >owners, it chowns them to the user performing the extraction. > > Having encountered the same problems, here is what I ended up doing. > Tar has the original V7 format available. There is an option to > create in that format. It does not use user names, but uses the > numeric uids and groups. This will keep them constant for you. > However, it does not backup directories or their permissions. Only > the files are written to the tar file. When the extraction is done, > it will create any needed directories with the right names and > contents. However the owner of the directories created will be that > of the user running tar. > > What I am doing is creating the tar file on the remote machine using > rmt (e.g., tar -cv machine:directory/name ...). That creates the tar > file on the remote server. I archive tar files rather than the > originals. I find it easier to restore from tar. The command I use > to create the ISO image is: > > mkisofs -R -J -V $DATE -o /backups/ISO/production.iso /backups/*.tar > > I then ftp the iso image over to a Mac and burn a DVD. The DVD then > mounts fine on FreeBSD and the tar files are directly accessible. My > backups use about 95% of the DVD. I have done some small backups to > CD and that also worked fine. > -- > -- Doug > Thanks Doug. I tried V7 format with tar, and found it didn't always 'do the right thing' with directories. From memory: * create a directory /home/fred owned by user fred * archive /home in V7 format * extract /home on another system * tar restores the ownerships for /home/fred correctly * but also sets /home as owned by fred! This might not be the exact steps (it was a few days ago) but I was certainly surprised by the results. Since I'm backing up /home as well as other things, it's important to get the directories right. Why do you prefer to put archives on the backup rather than the actual files & directories? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message