Upgrading Airnotifier: Difference between revisions
From MoodleDocs
David Mudrak (talk | contribs) m (Text replacement - "</code>" to "</syntaxhighlight>") |
(Add Obsolete category) |
||
Line 34: | Line 34: | ||
sudo -u airnotifier python airnotifier.py >> /var/airnotifier/console_log 2>> /var/airnotifier/error_log & | sudo -u airnotifier python airnotifier.py >> /var/airnotifier/console_log 2>> /var/airnotifier/error_log & | ||
[[Category: Mobile]] | [[Category: Mobile]] [[Category: Obsolete]] |
Revision as of 12:30, 15 September 2021
Steps to upgrade
- Stop the server, killing the process
ps aux | grep airnotifier
kill -9 PROCESS_ID
- Backup the MongoDB databases
- Backup AirNotifier settings database
mongodump -h localhost --port 27017 -d airnotifier -o /var/airnotifier/
- Backup each application data
mongodump -h localhost --port 27017 -d commoodlemoodlemobile -o /var/airnotifier/;
mongodump -h localhost --port 27017 -d commoodlemoodlemobiletest -o /var/airnotifier/
- Backup AirNotifier settings database
- Pull latest version from git
cd /opt/airnotifier
git pull
- Check that your current version has a version number in the options collection (AirNotifier settings database) (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 &