Hub 2022.3 Help

Restore an MSI Installation

If you experience problems with your Hub installation, you may need to restore to the most recent working version. Common scenarios that require that you restore an installation include:

  • You are unable to upgrade your installation successfully and need to restore the previously-installed version.

  • The database of your installation breaks and you need to restore the current version from a backup copy of your database.

In both cases, you can restore your installation using a valid backup of your Hub database. If your backups are out of date, you can attempt to restore your installation using valid copies of your configuration and data files. Restoration is only possible if you have either a valid backup or a copy of your database that is not corrupted.

You should test this procedure on a regular basis to make sure you can use your backup files to restore your installation after an outage or attack.

Prerequisites

Before you begin, make sure you have a backup copy of the database that you want to restore. Note the location of the backup copy so you are sure to select the correct file during this procedure.

If you don't have valid backup files or your backup files are out of date, follow the instructions to Restore the Current Version Without a Database Backup.

  • If you're rolling back to the previous installation version after an unsuccessful upgrade, use the backup that you created prior to installation. If you ignored this prerequisite, locate an archived backup file in the directory that is set as the Backup location that corresponds with the version of your previous installation.

  • If you're attempting to restore the current installation, locate an archived backup file in the directory that is set as the Backup location that corresponds with the current version of your installation.

Restore an Installation from a Backup Copy of Your Database

To restore your database to the current or previous version, you need to reinstall Hub and use the backup as the Upgrade Source during installation.

When you restore to a previous version of YouTrack, use a backup that corresponds to the version of the product that you want to restore.

To restore your database from a backup:

  1. Uninstall Hub from the Windows Control Panel.

  2. Make sure that the Hub service user (JetBrainsHub, by default) has full access to the directory where you saved the database backup file.

  3. Install a Hub build that is the same version or later than the version of your database backup. For detailed instructions, see MSI Installation.

    Please note:

    • To troubleshoot errors more effectively, run the MSI installer with verbose logging enabled. In a Command Prompt window, enter the following command:

      msiexec /i hub-<version number>.<build number>.msi /l*v install.txt

      Use the <version number> and <build number> of the installer package.

    • Configuration files from previous installations might be found during the installation. In this case, use the (Recommended) installation option that is selected by default.

  4. In the Configuration Wizard, select the Upgrade option.

  5. On the Select Upgrade Source page, select your backup as the Upgrade Source and click the Next button.

  6. Confirm or change the locations where Hub stores product data. When done, click the Next button.

    • Hub starts with the data from the backup file.

Restore the Current Version Without a Database Backup

There are a few cases where you are unable to restore you installation from backup.

  • Your backup files are missing or out of date.

  • The backup files on your server became corrupted and are unusable.

You may also want to follow this procedure when, for example, you were able to recover your data following a server crash and there is information that was recorded in YouTrack that is not in your most recent backup files.

You can attempt to restore the current version of your installation using valid copies of your configuration and data files. This restoration procedure is only successful when your configuration and data files are not corrupted. You can restore to an earlier version of Hub only when you have copies of files that have never been used to start a later version of the product.

To restore your database without a backup:

  1. Locate the most recent copies of your data and conf directories. The default location of the directories that are created during installation is %programdata%\\JetBrains\Hub\.

    Note that an administrator may have changed the location where Hub stores these files. The path to the current location of the database is stored in the data-dir parameter in the %programdata%\\JetBrains\Hub\conf\internal\bundle.properties file. You may also use copies of these directories that are stored in another location.

  2. Copy the conf directory and the hub subdirectory from the data folder. Paste them into a single, empty directory.

    • If your database is stored in the default location, you can copy these files from the location shown in the following image and structure the content of the new directory as shown on the right.

      Restore hub msi default data folder
    • If your database is stored in another location, reference the bundle.properties file to locate the data files and recreate the structure as shown on the right.

      Restore hub msi non default data folder
  3. Compress the contents of the new directory into an archive file. You can use any filename.

  4. Make sure that the Hub service user (JetBrainsHub, by default) has full access to this directory.

  5. Uninstall Hub from the Windows Control Panel.

  6. Install a Hub build that is the same version or later than the version of your database.

  7. In the Configuration Wizard, select the Upgrade option.

  8. On the Select Upgrade Source page, select the directory that contains your data and conf directories as the Upgrade Source and click the Next button.

  9. Confirm or change the locations where Hub stores product data. When done, click the Next button.

    • Hub starts with the data from the configuration and data files.

Last modified: 19 April 2022