Restore a ZIP Installation
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 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 a backup file 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
To restore your database to the current or previous version, you need to reinstall YouTrack 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:
Stop the YouTrack service. For detailed instructions, see Stop and Start YouTrack.
Remove the
<youtrack_home>
directory. The<youtrack_home>
directory is the location where the ZIP distribution was unpacked during installation. If the backup copy of the database that you want to use to restore your installation is located in this directory, move it to another location.Download and install a YouTrack build that is the same version or later than the version of your database backup. For detailed instructions, see ZIP Installation.
In the Configuration Wizard, select the Upgrade option.
On the Select Upgrade Source page, select your backup as the Upgrade Source and click the Next button.
- Confirm or change the locations where YouTrack stores product data. When done, click the Next button.
YouTrack starts with the data from the backup file.
Restore the Current Version Without a 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 YouTrack 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:
Locate the most recent copies of your
data
andconf
directories. By default, these directories are stored in the location where the ZIP distribution was unpacked during installation.
Note that an administrator may have changed the location where YouTrack stores these files. The path to the current location of the database is stored in thedata-dir
parameter in the<youtrack_home>/conf/internal/bundle.properties
file. You may also use copies of these directories that are stored in another location.- Copy the
conf
directory and thehub
andyoutrack
subdirectories of thedata
directory. 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.
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.
Compress the contents of the new directory into an archive file. You can use any filename.
Make sure that the service user account you use to run YouTrack has full access to this directory.
Stop the YouTrack service. For detailed instructions, see Stop and Start YouTrack.
Install a YouTrack build that is the same version or later than the version of your database.
In the Configuration Wizard, select the Upgrade option.
On the Select Upgrade Source page, select the archive file that you created in step 3, then click the Next button.
- Confirm or change the locations where YouTrack stores product data. When done, click the Next button.
YouTrack starts with the data from the configuration and data files.