Configurations for OpenBSD are generally stored in two places:
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.