From owner-freebsd-questions Mon May 25 15:34:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA21779 for freebsd-questions-outgoing; Mon, 25 May 1998 15:34:50 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from whqvax.picker.com (whqvax.picker.com [144.54.1.1]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id PAA21760; Mon, 25 May 1998 15:34:38 -0700 (PDT) (envelope-from rhh@ct.picker.com) Received: from ct.picker.com by whqvax.picker.com with SMTP; Mon, 25 May 1998 18:33:35 -0400 (EDT) Received: from elmer.ct.picker.com by ct.picker.com (4.1/SMI-4.1) id AA12822; Mon, 25 May 98 18:33:32 EDT Received: by elmer.ct.picker.com (SMI-8.6/SMI-SVR4) id SAA13061; Mon, 25 May 1998 18:32:57 -0400 Message-Id: <19980525183257.A13013@ct.picker.com> Date: Mon, 25 May 1998 18:32:57 -0400 From: Randall Hopper To: Alex Osokin , freebsd-questions@FreeBSD.ORG, Doug White , Aaron Jeremias Luz Cc: questions@FreeBSD.ORG Subject: Re: Moving filesystems to another drive Mail-Followup-To: Alex Osokin , freebsd-questions@FreeBSD.org, Doug White , Aaron Jeremias Luz , questions@FreeBSD.ORG References: <35630D3B.60AB51D4@ars.ml.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <35630D3B.60AB51D4@ars.ml.org>; from Alex Osokin on Wed, May 20, 1998 at 05:05:00PM +0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alex Osokin: |Finally I got such solution: |Do disklabel and newfs on your new drive (you may type /stand/sysinstall |as root then follow your intuition :)) |Then mount your / on new drive to /mnt for example and do | |tar cf - /etc | tar xvpf - -C /mnt |tar cf - /.... | tar xvpf - -C /mnt Aaron Jeremias Luz: |Or you could just use | tar -C / -cf - . | tar -C /mnt --exclude mnt/\* -xvpf - |after you've mounted all your filesystems at the correct A bit late jumping in on this thread, but I went through the same thing this weekend myself :-) A follow-up question. Is there a version of tar or cpio that stores FreeBSD's extended file attributes (chflags(1)) and longer i-node numbers. Seems like sometimes when I've used them in the past to copy root or data UFS partitions I get some complaint (truncating inode number, etc.). E.g.: cd $dir1; tar cvf - . | (cd $dir2; tar xpf -) OR cd $dir1; find . -print | cpio -dumpv $dir2 On that thread, is dump(8) safe to use when copying files between file systems if your target FS has a different geometry from your source FS? For example, using: cd $dir1; dump 0f - / | (cd $dir2; restore xf -) I expect that handles FreeBSD extended attributes, so if there are no other obstacles, maybe that's the way to go. I ended up making my new root exactly the same size as my previous, and used dump/restore to copy it over. I then used tar/tar to copy my other data partitions (since there are no files with FreeBSD extended attribute settings on those FSs AFAIK). Randall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message