Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2005 16:12:47 -0400
From:      Glenn Sieb <ges+lists@wingfoot.org>
To:        freebsd-questions@freebsd.org
Cc:        Qiang.Xu@fujixerox.com
Subject:   Re: undelete in FreeBSD?
Message-ID:  <42E1533F.9090202@wingfoot.org>
In-Reply-To: <7cbadc8705072102132d8fe2bd@mail.gmail.com>
References:  <20050721070434.254A11D930@imss.sgp.fujixerox.com> <7cbadc8705072102132d8fe2bd@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Nelis Lamprecht said the following on 7/21/2005 5:13 AM:

>On 7/21/05, Xu Qiang <Qiang.Xu@fujixerox.com> wrote:
>  
>
>>Hi, all:
>>
>>I mis-deleted /usr/local/bin directory in my FreeBSD. How can I restore it?
>>
>>    
>>
>
>There isn't a way to restore unless you have a backup. However, most
>of the binary files in /usr/local/bin are from packages/ports you have
>installed on your system. So you may be able to get away with using
>portupgrade(/usr/ports/sysutils/portupgrade) to re-install those
>packages and therefore "restoring" some if not all of /usr/local/bin.
>Do a portupgrade -f -a which forces portupgrade to re-install all
>packages/ports you have currently installed.
>
>  
>
Nelis,

First I think he might have to go re-install portupgrade.

Xu--as root, perform the following steps:

cd /tmp
tar cvf etc.tar /usr/local/etc/
cd /usr/ports/sysutils/portupgrade
make install && make clean
portupgrade -farRx bsdpan-

This will force reinstallation of all your ports. This will take *forever*.

And, just in case, we've tarred up your /usr/local/etc directory so you 
have a backup in /tmp!

Good luck!!
Best,
--Glenn

-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
          ~Benjamin Franklin, Historical Review of Pennsylvania, 1759




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