View Single Post
  #9   (View Single Post)  
Old 10th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Configurations for OpenBSD are generally stored in two places:
  • /etc/
  • /var/
The /var/ structures include the installed package metadata (/var/db/pkg/), along with many others, such as accounting, mail, cron, print spool, DNS, web server, DHCP leases ... it is a very large list of possible uses. /var/ is also the location that most third party applications store data that is not user-specific.

The package database isn't directly useful without a matching, synchronized set of installed packages. A full system backup, therefore, should include /usr/local/ as well as /var/.

----

But if you just want to be able to reinstall previously installed 3rd party packages, a simple list of all manually installed packages is all that is needed to install them, such as: $ pkg_info -qm > my.list.of.packages. Restoration is simply # pkg_add -l my.list.of.packages. If you happen to be transitioning between releases, you can add the -z option to the pkg_add(1) command.

See the pkg_add(1) and pkg_info(1) man pages for more details.

Last edited by jggimi; 10th September 2016 at 02:21 PM. Reason: clarity
Reply With Quote