Moving to new PC

RW list-freebsd-2004 at morbius.sent.com
Mon Sep 18 14:28:20 PDT 2006


On Sunday 17 September 2006 14:35, White Hat wrote:
> I am planning on migrating to a new PC in the near
> future, perhaps after FBSD 6.2 is released. I was
> therefore wondering if the following scenario was
> possible.
>
> 1) Tar up the /var/db/pkg directory on old system
> 2) Untar the collection into the same location on new
> PC
> 3) Run portsnap to get an up-to-date ports collection
> 4) Run portmanager to actually install the ports.
>
> I have close to 500 entries in the directory and
> trying to install them all manually is a lot of work.
> Of course there are META packages like KDE, but still
> I would have a lot of manual work involved to get it
> all back to the same state I had it in on the old PC.

Most of those 500 entries will be installed as a side effect, of a much 
smaller number of leaf-ports (around 10% in my case). You've probably already 
done your move, but for future reference, or in case you run into problems, I 
would suggest this:

1. Run "portmanager -slid" to remove any unwanted leaf-ports (probably all the 
ones you dont remember installing) 

2. run the following  (which may take several minutes) to generate a list of 
the remaining leaves:
 portmanager -sl |awk '{ print $2 }' |egrep  "^/[^/[:space:]]+/" > leafports

3 copy the leafports file to the new machine and run something like:
 cat leafports | xargs portmanager 




More information about the freebsd-questions mailing list