python script to backup installed packages

Giorgos Keramidas keramida at
Fri Feb 12 03:31:02 UTC 2010

On Thu, 11 Feb 2010 20:35:16 -0600, Adam Vande More <amvandemore at> wrote:
> Thanks for the tips, I may add some of your functionality to my own.
> I think I might add a couple more features like accepting a backup
> path from the command line and an auto create for the dir if it
> doesn't exist.  One other thing that might be useful is for it to
> automatically create an install script for the backed up packages
> which takes into account dependencies.  Almost have a package
> management system like some other unnamed OS's then. ;)

This is bordering on creeping featuritis, so I would probably avoid
going there.  If you *have* a backup of the packages, you can start by
installing portupgrade.  Then you can point portupgrade at the package
archive and use the -PP option to install all the dependencies.

Then you can avoid all that and just use something like:

        cd /mnt/backup/packages/All
        pkg_add vim-lite\*tbz

This will automatically install any packages vim-lite needs, as long as
they are available in the current working directory.

More information about the freebsd-questions mailing list