Ken Robinson's picture

I recently needed to upgrade my Mayan EDMS. Was running TKL Mayan EDMS v16.1 (Mayan EDMS v3.5.5) I thought I would share my upgrade notes here. They are based off of the offical documentation from Mayan. 

Mayan EDMS 4.0.15 Release Notes


# Turnkey Mayan V16.1
# EDMS Upgrade from 3.5.5 to 4.0.15

# Create home dir (Should have done this)
mkdir /home/mayan
chown mayan:mayan /home/mayan

# (1.) Stop Services 
systemctl stop supervisor

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

# Restore Config File. For some reason there is no config file?
# Upgrade tells you to modify this file
# Only if it does not exist!
mv /opt/mayan-edms/media/config_backup.yml /opt/mayan-edms/media/config.yml

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

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

# (5.) Remove un-needed packages 
su - mayan -c "curl -o /tmp/removals.txt"
su - mayan -c "/opt/mayan-edms/bin/pip uninstall -y -r /tmp/removals.txt"

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

# (7.) Create Custom Settings
# Only if they do not exist already
su - mayan -c "mkdir --parents /opt/mayan-edms/media/user_settings/"
su - mayan -c "touch /opt/mayan-edms/media/user_settings/"

# (8.) Change databases to 3
# Grab your password too you needed it later!
nano /etc/redis/redis.conf 

# (9.) Update the config.yml
# Only if these has not been done already
# Put your password at password-goes-here
# Replace this
# with
# LOCK_MANAGER_BACKEND: mayan.apps.lock_manager.backends.redis_lock.RedisLock
# LOCK_MANAGER_BACKEND_ARGUMENTS: {'redis_url':'redis://:password-goes-here@'}

nano /opt/mayan-edms/media/config.yml 

# Restart redis to take on the new Settings
systemctl restart redis.service

# (10.) Update Supervisor config
# Load the environment vars
su - mayan -c ". $ENV && $BIN/ platformtemplate supervisord" > /etc/supervisor/conf.d/mayan.conf

# (11.) Edit the supervisord configuration file and update any setting specific to your installation:

nano /etc/supervisor/conf.d/mayan.conf

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

# (13.) Start supervisor
systemctl start supervisor

# (14.) Clear the browser cache

# If you upgraded from 3.X to 4.X you need to move your files and cache since the
# default place was changed! If you skip this step existing documents will
# not show a preview
mv /opt/mayan-edms/media/document_storage/* /opt/mayan-edms/media/document_file_storage/
mv /opt/mayan-edms/media/document_cache/* /opt/mayan-edms/media/document_file_page_image_cache/








Jeremy Davis's picture

Great notes. Thanks heaps for sharing mate! :)

Morkus's picture

Hi, thanks for the updates - quick question, I'm working on a development plan to get started with Mayan and use it for archiving all my paper documents, do you have any helpfull documentation on getting started with archiving such as file structure, document retrevial, best use cases of metadata and so on, if you do that would be a great help.   Thanks in advance.

Add new comment