Update The MiaRec Web Portal

Please note: this is legacy documentation. Please check out https://docs.miarec.com/all/ for the most up-to-date documentation and user guides. 


Use these instructions only if MiaRec has been installed manually (depreciated). 


1. Download The Latest MiaRec Web Portal Files

Fill out the Download form to get access to the latest version of MiaRec.


Extract this archive.

tar -xzvf miarecweb-*.tar.gz


2. Rename The Old MiaRec Web Application Files

It is recommended to rename the existing MiaRec web portal folder instead of removing it. This will allow you to restore the old version if necessary.

mv /var/www/miarec/app /var/www/miarec/app-`date +"%m-%d-%Y"`


3. Install The New Version Of The MiaRec Web Application

Move the extracted new files to /var/www/miarec/app

mv miarecweb-*/ /var/www/miarec/app

Clear cache (pre-compiled templates):

rm -rf /var/www/miarec/cache/*


4. Upgrade MiaRec Database Layout

Activate python virtual environment.

source /var/www/miarec/pyenv/bin/activate

Make sure the development packages of libxml2 and libxslt are installed:

yum install libxml2-devel libxslt-devel

Install/update miarecweb application:

pip install -e /var/www/miarec/app

Run database migration script (alembic):

alembic -c /var/www/miarec/production.ini upgrade head

Tip: if execution of the database migration script takes more than 5 minutes, then probably some database tables are locked by other processes and the migration script waits till lock is released. To fix that issue, you need to stop other services, which are using MiaRec database.

Open another SSH window and execute the following commands:

service httpd stop

service celeryd stop

service celerybeat stop


5. Restart Apache & Celery Services

service httpd restart

service celeryd restart

service celerybeat stop
service celerybeat start