Commands‎ > ‎


Checks to see if an upgrade to the HashBackup executable is available and optionally installs the new version.

$ hb upgrade [-n] [--force]

With no options, the upgrade command will check the upgrade servers to see if a newer version of HashBackup is available and will display the change log.  The change log explains changes made since the version you are currently running.  Upgrade will then ask if you want to install this new version.  If not, it exits.  If you do want to install, it downloads the executable from the HashBackup LLC upgrade servers, verifies the file signature to ensure authenticity, and installs the new version, renaming the current executable as hb.bak.

The -n option performs all of these steps, including the download and signature verify, but does not replace the hb executable.

With the --force option, upgrade performs all steps and does not ask for confirmation before installing the new version.  This is typically used in a cron job to periodically download and automatically install upgrades.  A reasonable period to check for upgrades is every week.  Adding >/dev/null after the --force option prevents a cron email when there is no upgrade available; an email will only be sent when an upgrade occurs, and it will contain the change log.

To ensure the program you are downloading is an authentic version of HashBackup, the download package is signed with a private key during the build process.  The private key is not stored on the download server.  The upgrade command uses the matching public key built in to the HB executable to verify the file signature.  This makes it nearly impossible for upgrade to install a corrupt or fake version of HashBackup.

HashBackup may do an automatic database upgrade the first time the new version is used.  If it has been a while since you have upgraded, there may be multiple database upgrades, as in the example below.  The upgrade policy is that databases can be upgraded if they are less than a year old.  If more than a year old, you can still use the same version of HashBackup that created the database.  If there is any problem during the upgrade, the database is rolled back.

$ hb clear -c hb

HashBackup build #1961 Copyright 2009-2017 HashBackup, LLC

Current database rev: 24

Upgrading database to rev: 29

Copying /hb/hb.db to /hb/hb.db.orig before upgrade

  Upgrade to rev 25...

    Update directories

    Update flags

  Upgrade to rev 26...

    Update part 1

    Update part 2

  Upgrade to rev 27...

    Fix multiple C records

  Upgrade to rev 28...

    Update dest.db

  Upgrade to rev 29...

    Update stats for interrupted backups

Database upgraded to rev 29

Backup directory: /hb

Are you sure you want to remove all backup data? yes

All backups removed