Ken Robinson's picture

Edit: Updated to 4.4.4 - Also note support from the developer.

Please note that the developer of Mayan NO LONGER SUPPORTS A MANUAL INSTALL. Hint we use a manual install for Turnkey. It seems he started removing upgrade instructions after 4.4. However with that being said, these instructions do work! If you run into issues post here first!

Note: The warnings about urllib3, chardet and charset_normalizer are normal and are cause by the transition between Python 3.9 and 3.10 taking place for some dependencies. 

 

Have a Fresh TKL Mayan EDMS v17.1 install and want to upgrade? In this post I will document how you can upgrade Mayan EDMS v17.1 v4.2.7 to the latest (as of this post) to v4.4.4 in about 30 minutes or less! If you find this helpful or have questions or issues post a reply.

Note: There are changes in v4.4.2 that are not backwards compatible. Please read the release notes to see what those changes are! 

 

This guide assumes:

  • You are logged in as root
  • You have a working system
  • You have not made any modifications to the base system
  • Made a complete backup of your system

Now lets crack on once again shall we? This is very much like my other post "TKL Mayan EDMS v16.1 - Upgrade v3.5.5 to 4.0.23" where I basically take instructions from the docs but tweak them for TKL install.

Mayan EDMS 4.4.4 Release Notes

 

# Turnkey Mayan V17.1
# EDMS Upgrade from 4.2.7 to 4.4.4

# Create home dir
# Pip will be angry if there is no home dir, cache will be disabled
# Also su gets angry when the home dir is missing in later steps and
# will fail.
#
# Skip this if the home dir is there
mkdir /home/mayan
chown mayan:mayan /home/mayan


# (1.) Stop Services 
#
systemctl stop supervisor


# (2.) Backup supervisor config
#
mv /etc/supervisor/conf.d/mayan.conf /etc/supervisor/conf.d/mayan.conf.backup


# (3.) Backup db
#
pg_dump mayan > ~/mayan_db_backup.sql


# (4.) Upgrade PIP
#
su - mayan -c "/opt/mayan-edms/bin/pip install --upgrade pip"


# (5.) Remove un-needed packages 
#
su - mayan -c "curl https://gitlab.com/mayan-edms/mayan-edms/-/raw/v4.4.4/removals.txt -o /tmp/removals.txt"
su - mayan -c "/opt/mayan-edms/bin/pip uninstall --yes --requirement /tmp/removals.txt"


# (6.) Update Mayan
#
su - mayan -c "/opt/mayan-edms/bin/pip install mayan-edms==4.4.4"


# (7.) Update the environment file
# as we only need one line now all settings are in the config file in the media folder
# Skip this step if you already did this
#
mv /etc/mayan/env /etc/mayan/env.backup
echo "export MAYAN_MEDIA_ROOT=/opt/mayan-edms/media" > /etc/mayan/env


# (8.) Setup the environment for the next few steps 
# 
ENV=/etc/mayan/env
BIN=/opt/mayan-edms/bin


# (9.) Update Supervisor config
# You may get some errors at top, but as long as the file gets updated
su - mayan -c ". $ENV && $BIN/mayan-edms.py platform_template supervisord" > /etc/supervisor/conf.d/mayan.conf


# (11.) Edit the supervisord configuration file and update any setting 
# specific to your installation and verify its been created
nano /etc/supervisor/conf.d/mayan.conf


# (12.) Upgrade db
#
su - mayan -c ". $ENV && $BIN/mayan-edms.py common_perform_upgrade"


# (13.) Start supervisor, check status
systemctl start supervisor
supervisorctl status


# (14.) Clear the browser cache, and check app functions
#


# (15.) Cleanup backup files
# Only clear the files if everything is working!
#
rm /etc/mayan/env.backup
rm ~/mayan_db_backup.sql
rm /etc/supervisor/conf.d/mayan.conf.backup
Forum: 
Ken Robinson's picture

Updated to upgrade to v4.4.4

Regards,

Ken  
":0)

http://www.github.com/DocCyblade

Jeremy Davis's picture

Thanks Ken! :)

Marcel Kaiser's picture

That guide helped a lot! Thanks a lot!

Add new comment