Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 1998 18:32:57 -0400
From:      Randall Hopper <rhh@ct.picker.com>
To:        Alex Osokin <ars@ars.ml.org>, freebsd-questions@FreeBSD.ORG, Doug White <dwhite@resnet.uoregon.edu>, Aaron Jeremias Luz <aaron@csh.rit.edu>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Moving filesystems to another drive
Message-ID:  <19980525183257.A13013@ct.picker.com>
In-Reply-To: <35630D3B.60AB51D4@ars.ml.org>; from Alex Osokin on Wed, May 20, 1998 at 05:05:00PM %2B0000
References:  <Chameleon.980519210716.kshuff@kshuff.fast.net> <35630D3B.60AB51D4@ars.ml.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980525183257.A13013>