Skip to content

Upgrade from Version 1.0.0-1.4.3 to 1.4.4⚓︎

Note

  • Keep SECRET_KEY consistent with the old version during upgrade and migration, otherwise encrypted database data cannot be decrypted.
  • Be sure to backup the database and JumpServer source code before updating.

1 Backup Database⚓︎

cp -r /opt/jumpserver /opt/jumpserver_bak
mysqldump -uroot -p jumpserver > /opt/jumpserver.sql

2 Upgrade Steps⚓︎

Note: Please read each step carefully and understand it before proceeding with the upgrade

  • Check the current version of each component first.
  • Upgrade from version 0.x to 1.x is not supported.
  • Starting from version 1.4.x, MySQL version needs to be greater than or equal to 5.7
  • Update the configuration file by copying the old version settings to the new configuration file.

2.1 Stop Core⚓︎

cd /opt/jumpserver
source /opt/py3/bin/activate
./jms stop
  • Replace /opt with your actual installation directory.

2.2 Switch to 1.4.4 Branch⚓︎

cd /opt/jumpserver
git fetch
git checkout 1.4.4
git pull
If executing git pull prompts an error, handle according to the prompt
  • Error: Your local changes to the following file would be overwritten by merge
git reset --hard
git pull
If your code is not obtained from the GitHub repository, use this hidden help for migration
  1. Backup database
  2. Obtain new version code
  3. Copy old configuration files to new location
  4. Update dependencies
  5. Execute migration
  6. Start service

2.3 Update Dependencies⚓︎

pip install -r requirements/requirements.txt
Ensure Python3 virtual environment is loaded. If errors occur during installation, usually it's because dependency packages are not fully installed. Use search engines to solve
  • Domestically, you can use mirror acceleration.
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple

2.4 Handle Upgrade⚓︎

cd utils
sh make_migrations.sh
If executing sh make_migrations.sh has errors, refer here for handling
  • You have an error in your SQL syntax; check the manual than corresponds to your MySql server version for the right syntax to use near '(6) NOT NULL'
# Modify database charset
ALTER DATABASE jumpserver CHARACTER SET utf8 COLLATE utf8_general_ci;

Note

  • Versions smaller than 1.1.0 need to execute this step before upgrading.
cd utils
sh 1.0.x_to_1.1.0_migrations.sql

Note

  • Versions smaller than 1.4.0 need to execute this step before upgrading.
cd utils
sh 1.3.x_to_1.4.0_migrations.sql

2.5 Start Core⚓︎

cd /opt/jumpserver
source /opt/py3/bin/activate
./jms start
  • Ensure there are no errors on startup.
  • Then upgrade according to the 1.4.4 to 1.4.5 upgrade documentation, otherwise normal use will not be possible.