How to upgrade your Upsource installation?
Overview
Upsource uses the major.minor.patch version numbering scheme. Upgrade procedures vary significantly depending on the version increment (1.0 to 2.0 vs 1.0 to 1.0.1). Both procedures are outlined below.
Instructions
Note: The commands listed below are Windows commands. If you’re working on a Linux or Mac OS X server, simply replace .bat
with .sh
.
1. Major (minor) upgrade
Should be used when upgrading to a major (minor) release, e.g. from 1.0 to 2.0 or from 2.0 to 2.5
-
Create a backup while the existing installation is running.
-
Stop Upsource:
<upsource_home>\bin\upsource.bat stop
- Use your operating system tools to make sure that all Java processes launched by Upsource are no longer running (use
ps
on Linux / OS X or Process Explorer on Windows).- If there are no Upsource-related Java processes left, proceed to step 4.
- If you see Java processes still running:
- (Optional, Windows only) Please consider taking thread dumps from those processes using the jstack tool (it’s located under<upsource_home>/internal/java/windows-amd64/bin) and provide the thread dumps to JetBrains for investigation.
- Kill the remaining processes.
-
Rename your <upsource_home> directory to Upsource.old (you can use another name).
-
Unpack the zip archive with a new Upsource build. Note: the unzipped installation should not be placed inside the old <upsource_home> directory.
-
Copy data and conf folder from the Upsource.old/backup/<date_of_backup> directory to the new <upsource_home>.
Note: data and conf folders contain hidden files. Use recursive copying (
cp -r
on Linux) to avoid data loss. Before copying data and conf folders to the new installation, the existing data and conf folder in that installation should be deleted to prevent data corruption. - Start Upsource:
<upsource_home>\bin\upsource.bat start
2. Patch version upgrade
Should be used when upgrading to a patch update, e.g. from 1.0 to 1.0.1 or from 2.0.1 to 2.0.2
-
Stop Upsource:
<upsource_home>\bin\upsource.bat stop
- Use your operating system tools to make sure that all Java processes launched by Upsource are no longer running (use
ps
on Linux / OS X or Process Explorer on Windows).
- If there are no Upsource-related Java processes left, proceed to step 3.
- If you see Java processes still running:
- (Optional, Windows only) Please consider taking thread dumps from those processes using the jstack tool (it's located under <upsource_home>/internal/java/windows-amd64/bin) and provide the thread dumps to JetBrains for investigation.
- Kill the remaining processes.
-
Rename your <upsource_home> directory to Upsource.old (you can use another name).
-
Unpack the zip archive with a new Upsource build. Note: the unzipped installation should not be placed inside the old <upsource_home> directory.
-
Copy data and conf directories from the old installation to the new one.
Note: data and conf folders contain hidden files. Use recursive copying (
cp -r
on Linux) to avoid data loss. Before copying data and conf folders to the new installation, the existing data and conf folder in that installation should be deleted to prevent data corruption. - Start Upsource:
<upsource_home>\bin\upsource.bat start
Please sign in to leave a comment.
info outdated. It is no more required to copy data/conf dirs
This manual approach still works. However, your note is correct, Upsource now has a UI wizard for the upgrade procedure.
Detailed instruction can be found here:
https://www.jetbrains.com/help/upsource/3.5/upgrading-your-upsource-installation.html
I hope, this approach will work forever - the "wizzard" way is nice if you maintain single instance of such service. If you want to package as RPM and let RPM to upgrade, the directory-like approach is far much better.
Is it bound to work in the future as well, this "directory-backup" approach, please?
Thanks!
@Martin We are not going to drop this "directory-backup" approach.