Extract particular date snapshot from /var/db/portsnap?

Peter Vereshagin peter at vereshagin.org
Wed Jun 15 02:51:51 UTC 2011

You can't take no for an answer, freebsd-questions!
2011/06/14 20:59:33 -0400 Greg Larkin <glarkin at FreeBSD.org> => To Peter Vereshagin :

GL> > How can I extract an 'old' snapshot from portsnap database?
GL> > Does it keep them? Does portsnap keep snapshots fetched previously?
GL> > 
GL> > Suppose I need the particular port or the whole tree as of the specified date
GL> > and time?
GL> > Or, if I need the particular version of the specified port and optionally  the
GL> > ports tree that corresponds it?
GL> > 
GL> > Thank you.
GL> Hi Peter,
GL> You can fetch a ports tree as of specific date like so:
GL> cvs -d :ext:anoncvs at anoncvs1.FreeBSD.org:/home/ncvs export -D 2010-10-01
GL> -d ports-2010-10-01 ports
GL> In this example, I am exporting (no CVS metadata dirs) a full ports tree
GL> as of Oct 1st, 2010 into the directory "ports-2010-10-01".

Sure, I know I can do it with (x)VCS.
I'd like an offline solution as it can be faster for me than to go and turn my
big internet switch on ;-)

Looking at the portsnap storage I see no mission impossible about it. It was an
empirical part of my question.

Having a port for the distfile I have from half a year ago and knowledge it is
stored somewhere in /var/db/portsnap is a practical part of my question.

I just need no internet connection to get the port from VCS if I can have the
new distfile instead, so it's no much useful to use VCS for this case ;-)

GL> You can keep many different dated copies of the ports tree, and you can
GL> also fetch portions of it as of a specific date if you specify a more
GL> complete module name, e.g. ports/lang/gcc45.

But hell yes, having VCS before such a situation to happen is good. "Just if we
knew before ..." From the first glance at the what the portsnap is it looks
promising it's certainly a natural matter for it: ports snapshots management.

For example, the file system snapshots are very useful for that same purpose I
describe here, why ports snapshots should not?

73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB  12F8 0CE1 4AAC A0E2 6627)

More information about the freebsd-questions mailing list