Upgrading Airnotifier: Difference between revisions
From MoodleDocs
Juan Leyva (talk | contribs) No edit summary |
Juan Leyva (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
ps aux | grep airnotifier | ps aux | grep airnotifier | ||
kill -0 PROCESS_ID | kill -0 PROCESS_ID | ||
- Backup the mondodb databases | - Backup the mondodb databases | ||
Line 31: | Line 26: | ||
Run the upgrade.py script | Run the upgrade.py script | ||
cd /opt/airnotifier | |||
python upgrade.py | python upgrade.py | ||
Revision as of 10:29, 16 October 2014
Steps to upgrade
- Stop the server, killing the process
ps aux | grep airnotifier kill -0 PROCESS_ID
- Backup the mondodb databases
Applications list database
mongodump -h localhost --port 27017 -d airnotifier -o /var/airnotifier/
Each application database
mongodump -h localhost --port 27017 -d commoodlemoodlemobile -o /var/airnotifier/ mongodump -h localhost --port 27017 -d commoodlemoodlemobiletest -o /var/airnotifier/
Pull latest version from git
git pull
Check that your current version has a version number in the options collection (Airnotifierdatabase) (Older Airnotifier versions doesn't have it), use the shell:
mongo use airnotifier db.options.find()
If there is not a value option, create a new one:
db.options.insert({name: "version", value: 20140101})
Run the upgrade.py script
cd /opt/airnotifier python upgrade.py
Start the server again
./startserver
or
sudo -u airnotifier python airnotifier.py >> /var/airnotifier/console_log 2>> /var/airnotifier/error_log &