transfer /opt/local to another machine

René J.V. Bertin rjvbertin at gmail.com
Sun Apr 12 06:30:18 PDT 2015


On Sunday April 12 2015 12:54:55 j. van den hoff wrote:

>astonishing long time (over night, basically) partly due to a multi-hour  
>recompilation of the `atlas' library. and that was on the faster machine  

That's to be expected with atlas, and it's also probably the one port that you'd want to rebuild on the other machine unless it's got identical hardware.

># now generate tarfile
>sudo port -vf deactivate installed

That basically concentrates everything you have installed in /opt/local/var/macports/software

>sudo tar vcf myports.tar /opt/local

I'd do 
(cd /opt/local ; rsync -aAXH . macports at target.local:/opt/local/ )

>the above on the second machine. but I wonder whether I will not miss  
>assorted pieces installed by macports outside of /opt/local? any advice  
>would be appreciated.

There shouldn't be anything "structural" that's installed outside of ${prefix} and that will cause issues when it's missing. You may find you'll be missing configuration settings, additional support data etc, but a priori it should look to the installed ports as if they were freshly installed on the remove machine.
AFAIK the tarballs in /opt/local/var/macports/software are identical to the ones you download when installing a binary package, so using them as an install media should "just work".

I think you could also copy all of said tarballs from the source to /opt/local/var/macports/incoming/verified and then do a port install with the list of ports you have on the source. "Base" doesn't appear to check if the contents of that directory was indeed downloaded through a port fetch step and then verified...

R


More information about the macports-users mailing list