{Disarmed} Re: What's best way to copy a filesystem? [was: Re:
slight emergency here...]
Derek Ragona
derek at computinginnovations.com
Sun Oct 28 16:58:38 PDT 2007
At 06:02 PM 10/28/2007, Gary Kline wrote:
>On Sun, Oct 28, 2007 at 01:54:54PM -0800, Gary Kline wrote:
> > Guys,
> >
> >
> > I think I've found the reason for the intermittent rashes.
> > Part of /var is bad, and fsck cannot allocate inoinfo to repair
> > the damage.
> >
> > At any rate, how do i as root, single user, cp -rp all of /var to
> > elsewhere (/storage) and rmdir /var, them mkdir /var and copy
> > everything back?? I've forgotten the cpio magic command.
> >
> The nutshelll of this posting could be: What's the best tool
> to copy a /FILESYSTEM to /storage/FILESYSTEM?
I don't know if this is the "best" way, but is one I've done for years . . .
cd srcdir ; tar -cf - . | (cd destdir ; tar -xpf -)
which for your example would be:
cd /FILESYSTEM; tar -cf - . | (cd /storage/FILESYSTEM ; tar -xpf -)
then you would
rm -rf /FILESYSTEM
ln -s /storage/FILESYSTEM /FILESYSTEM
-Derek
>--
> Gary Kline kline at thought.org www.thought.org Public Service Unix
> http://jottings.thought.org http://transfinite.thought.org
>
>_______________________________________________
>freebsd-questions at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>MailScanner thanks transtec Computers for their support.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
More information about the freebsd-questions
mailing list