pkg database backup and restore



Hello,

Can anyone provide some practical insight into best methods of backing up and restoring package databases?

Inside of /var/db there are 2 directories:
/var/db/ports
and
/var/db/pkg

/var/db/ports I pretty much understand; that seems to simply be the config options saved from when a port is installed. ok.


/var/db/pkg contains:

pkgdb.db
and a subdirectory for every port installed.


If part of a normal backup routine, we are regularly backing up /var/db/pkg, how can we best use that backup in a scenario in which a machine needs to be rebuilt from scratch, and we're trying to save time going through and doing a portinstall on everything we can remember that should be installed? (or alternatively taking a backup of the results from a periodic "pkg_info > installed_packages.txt" and painstakenly going through the list and reinstalling everything one-by-one).

Essentially, we're just looking for a streamlined approach to restoring the installed ports when we need to rebuild a machine.


Thanks,
DW

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Complete Backup
    ... I should think I would be in the market for a clone. ... Subject: Re: Complete Backup ... the OP) original query re a backing up strategy. ... with disk imaging programs such as Symantec's Norton Ghost or Acronis True ...
    (microsoft.public.windowsxp.general)
  • Re: Help with Managing my web site
    ... DavidF wrote: ... after reading your post I will be backing everything up this weekend. ... drives crash. ... I have found that I do keep a flash drive handy and backup ...
    (microsoft.public.publisher.webdesign)
  • Re: Help with Managing my web site
    ... DavidF wrote: ... after reading your post I will be backing everything up this weekend. ... of course as you go through it, you will be reminded to backup in ... drives crash. ...
    (microsoft.public.publisher.webdesign)
  • Re: Miantinence
    ... in backing up. ... you need to backup your personal files. ... System Restore is not a method of backing up. ...
    (microsoft.public.windowsxp.newusers)
  • Re: question about NTBackup
    ... >> Firstly, to the OP, I don't see much point in backing up System State ... If the task is to backup AD then you backup a ... The discussion is around backing up System ... >> the backup to avoid swamping the network. ...
    (microsoft.public.win2000.active_directory)