I love JetBrains software, I really do. How I’d get by without ReSharper is anyone’s guess but they are not issue free by any stretch. There also seems to be some very odd issues with their documentation a lot of the time as well. A real shame since considering how nice their products are and how easy they are to get going with the processes of migrating to new version can be a bit hit and miss – if you follow their docs.
A case in point is YouTrack. I’ve just had to reinstall my server that runs my local instance of YouTrack. Now an issue tracker for a developer is insanely important. It will more often than not contain lots of hard earned intelligence not to mention priorities for work and ways for lots of disparate team members to communicate.
I was running YouTrack 5.2.5 and I had that configured to do automatic backups. So looking at the JetBrains instructions on how to restore a backup looks remarkably straight forward (it is by the way just not how they describe!):
For successful restoring, version of the backed up database should be the same or older than the version of YouTrack, to which you restore this database.
To restore a database from a backup, proceed as follows:
- Download a backup tar.gz file via web UI from the Administration > Database Backup page or locate a needed backup file directly in the specified backup folder on the YouTrack server machine.
- Stop YouTrack server instance.
- Clean all content of the database location directory. By default, the database is located in the teamsysdata folder in the home directory of a user account, which starts YouTrack. You can change default database location, for more details please refer to the Changing Database Location page.
- Extract the downloaded backup file to your database location.
- Start YouTrack.
The instructions I’m about to write below work for 5.x and 6.x (I’ve tested these on both versions and they work).
Firstly the backups I have generated from YouTrack are not tarbals, they are .zip files, this is configurable in YouTrack but I cannot find anything on the JetBrains site that details the process for zips so I can only assume that either configuration will result in a file that contains the same data. Anyway, I digress.
So mistake number one, no mention of zip files.
In step three is says – Clean ALL contents of the database directory. DO NOT DO THIS!! If you delete all the files in there as suggested and then dump the contents of your backup ZIP into the directory, it doesn’t work. At least it didn’t for me. Also the teamsysdata directory they mention in this article referrd specifically to YouTrack 5.x yet this article was written in 2012 and is also part of the 6.x documentation. YouTrack 6.x is vastly different to 5.x and does not use the same structure for the database at all.
What I do (and always works for me) is:
- Logout of YouTrack
- Stop the YouTrack service
- Remove the existing 00000000000.xd file from your YouTrack database directory (your file name maybe slightly different)
- Copy over your backup *.xd files into the database location – mine were called (00000010g00.xd, 00000010o00.xd, 00000011000.xd)
- Copy over your blob directory into the existing blob directory
- Leave all the other files in place and untouched
- Restart the YouTrack service
- Login under the root account
- You should now see your restored issues
Personally I don’t understand how a company that makes such great things as ReSharper can make such glaring issues in their documentation. Certainly when it refers to something as important as restoring backups of your hard earned intelligence.
Anyway, I hope this helps and clears up some confusion surrounding this issue. JetBrain, if you are listening please sort this out.