Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jul 2004 15:37:51 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Don Lewis <truckman@FreeBSD.org>
Cc:        damaker@fillibach.de
Subject:   Re: moving /usr to another partition
Message-ID:  <Pine.BSF.4.21.0407051534240.66234-100000@InterJet.elischer.org>
In-Reply-To: <200407052151.i65LouOV002134@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Mon, 5 Jul 2004, Don Lewis wrote:

> On  5 Jul, Konstantin 'Kosta' Welke wrote:
> > Hi!
> > 
> > Diskspace is running low, so I'd like to move my /usr to another
> > disk. I was told that cp -Rv is not a good idea and i should use
> > dump instead. The problem is: That disk is big and half-full and
> > I don't want to empty it. Is it possible  to let restore work to
> > a directory instead of a disk? Im not sure after reading the man
> > page, google doesnt know either and I dont want to find out "the
> > hard way". So i guessed it couldn't hurt to ask...
> > 
> > If you have any hints or alternatives, please let me know!
> 
> I'm pretty sure that "restore -r" will do the right thing and just
> unpack the dump archive into the current working directory.  I'm pretty
> sure that I've done this in the past.
> 
> I don't understand the warnings in the man page:
> 
>      -r      Restore (rebuild a file system).  The target file system should
>              be made pristine with newfs(8), mounted and the user cd'd into
>              the pristine file system before starting the restoration of the
>              initial level 0 backup.
>              [snip]
>              The -r flag precludes an interac-
>              tive file extraction and can be detrimental to one's health if
>              not used carefully (not to mention the disk)
> 
> Restoring into a directory that already contains stuff is likely to be
> harmful to the contents, but I think restoring into an empty directory
> should be fine.
> 
> Anyone else care to comment?

I've done this a lot..

boot single user..
mount /usr
mount -u /
mount /var
mount /newuser
cd /usr
find . -xdev -depth|cpio -pdmuv /newusr

edit /etc/fstab to swap newusr and usr
sync
reboot

> 
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0407051534240.66234-100000>