The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Update for FreeBSD 5.X
Author: dordal 
Date:   01-08-05 21:18

Just a quick note to let you know that the procedure contributed by Dean at
the bottom of the page on no
longer works in FreeBSD 5.X.

The nice folks have updated the options that tar takes, and the correct
command is of the form:
tar --one-file-system -c -f - -C / . | tar xpvf - -C /mnt

tar --one-file-system -c -f - -C / . | tar xpvf - -C /mnt
tar --one-file-system -c -f - -C /var . | tar xpvf - -C /mnt/var
tar --one-file-system -c -f - -C /tmp . | tar xpvf - -C /mnt/tmp
tar --one-file-system -c -f - -C /usr . | tar xpvf - -C /mnt/usr

Reply To This Message
 6.1 pre-release Re: Update for FreeBSD 5.X
Author: sailor 
Date:   11-02-06 16:48

today i tried Dean's solution on my 6.1 PRE-RELEASE machine,

after 3 or 4 hours in hell, there are 2 things you should be noted:

1. if you mount your new disk at /mnt,
then /mnt should be excluded from tar,
otherwise, the /mnt/ directory will be tarred recursively.

2. use gtar, otherwise the permission of the directories (like /usr, /var!) will be a mess. (drwx---------, owned by root)
it's really strange. i hope it's just a temporary bug.

so, this is what i did

gtar cf - -C / --one-file-system --exclude /mnt/ . | gtar xpvf - -C /mnt/

Post Edited (11-02-06 09:02)

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum