How to really restore packages with pkg backup?

Hi all,

I'm trying to restore installed packages in a fresh FreeBSD install, from another server pkg database export.

pkg backup -d file.db and pkg backup -r file.db only dumping / restoring database, indeed.

But how to "force" pkg to really install the package list like the host-master configuration?
 
Re: How to really restore packets with pkg backup ?

pkg upgrade -fy would normally be what you are looking for to force a re-install of everything. However, I don't know what would happen when you take a package database from one machine and put it on another since that doesn't appear to be what backing up the database is designed to do.
 
Excellent solution! Actually it is the only one that I have found so far for bootstrapping a new server with packages from a local repo. Assuming that you maintain a recent pkg.sql you can easily deploy a new server within minutes.
 
Back
Top