ports database

Polytropon freebsd at edvax.de
Sun Aug 29 13:07:47 UTC 2010

On Sat, 28 Aug 2010 15:59:25 -0700, perryh at pluto.rain.com wrote:
> Polytropon <freebsd at edvax.de> wrote:
> > >     tar -cf ports.tar /usr/port
> >
> > It should be, better suited:
> >
> > 	# cd /usr
> > 	# tar cf ports.tar ports
> >
> > So one could do "tar xf ports.tar" in the target machine's /usr
> > ...
> Better put the created tarfile somewhere other than in the directory
> that is being tarred :)

In thic case, the tarfile is created outside ports/, so it's not
within the directory it is created in. But of course it's right:
the resulting archive can be better picked up from a directory
like /tmp, it should just have enough space available (allthough
a compressed ports tree should be less than 500 MB).

> and it might as well be compressed, something like:
> # cd /usr
> # tar cf - ports | gzip > /var/tmp/ports.tgz

That is possible - if space is an issue (and not time); it is
also possible to do like this:

	# cd /usr
	# tar cjf /tmp/ports.tar.bz2 ports

I think it will even be better compression ratio using the BZip2
algorithm (tar option j instead of z).

One thing worth mentioning: The ports tree should be "clean" before
transfering (which is not a problem if it has just been fetched).
If you have already worked with it, make sure to have been running

	# make clean

in the ports main directory, or simply delete all work/ subdirs
that might contain tons of files not needed. The directories
ports/distfiles/ and ports/packages should also be checked. As
they contain compressed stuff, compressing them won't be much

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list