2

As I'm finally getting around to reading through the FreeBSD Handbook, I discovered that PKG is taking daily backups of the package database (defined in periodic.conf). My questions are as follows:

  • Is a daily pkg backup necessary for a desktop environment?
  • What would be the downside to disabling the backup (daily_backup_pkgdb_enable="NO")?
  • Why would I ever need to restore a backup of the package database?
  • The package database contains details of every port and package installed on the desktop. If it became corrupted, it may be difficult to update the desktop without doing a fresh installation. All of my installs are scripted, so if the package database became corrupted, I wouldn't even bother with the pkgdb backup. – Richard Smith Nov 28 '18 at 17:50
  • Thanks Richard! Scripting installs sounds like a much better idea (once I settle on a core group of packages). Do you happen to know if the pkg db gets updated after each new package is installed? Or are the daily backup and manually running the backup process the only 2 options (aside from skipping this altogether and running install scripts of known packages)? Just trying to decide if I should keep it automated, or if I disable it, will I need to remember to backup the pkg db manually with each new install? – bgregs Nov 28 '18 at 18:07
  • Why do you want to turn it off? Is there a problem you are attempting to solve? – Richard Smith Nov 28 '18 at 18:27
  • There is no issue I'm trying to solve, I'm just a firm believer in trying to understand what's running in the background. This question stems from my lack of understanding definitely. When I read "automated backup", I got the impression of a lot of wasted space. If it only keeps one daily copy and just overwrites it each day, I'm fine with that approach. Ultimately, I just couldn't find any straightforward answer to the pkg db's role, and wanted to understand it. – bgregs Nov 28 '18 at 18:36
  • 1
    It keeps about 7 copies. But it is configurable. See /usr/local/etc/periodic/daily/411.pkg-backup. – Richard Smith Nov 28 '18 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.