Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Migrating Airnotifier: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 1: Line 1:
Sometimes it useful to have a local airnotifier instance for testing, in this document is described step by step how to migrate a working Airnotifier installation to a different server
Sometimes it useful to have a local airnotifier instance for testing, in this document is described step by step how to migrate a working Airnotifier installation to a different server
'''Install the required dependencies for running airnotifier in the new server'''
See https://github.com/airnotifier/airnotifier/wiki/Installation


'''Backup the mondodb databases'''
'''Backup the mondodb databases'''
Line 5: Line 8:
Applications list database
Applications list database


mongodump -h localhost --port 27017 -d airnotifier -o /var/airnotifier/
mongodump -h localhost --port 27017 -d airnotifier -o /var/airnotifier/


Each application database
Each application database


mongodump -h localhost --port 27017 -d commoodlemoodlemobile -o /var/airnotifier/
mongodump -h localhost --port 27017 -d commoodlemoodlemobile -o /var/airnotifier/
mongodump -h localhost --port 27017 -d commoodlemoodlemobiletest -o /var/airnotifier/
mongodump -h localhost --port 27017 -d commoodlemoodlemobiletest -o /var/airnotifier/
 


'''Copy the old installation files and databases to the new server'''
'''Copy the old installation files and databases to the new server'''
Line 21: Line 25:
  scp -r root@messages.moodle.net:/opt/airnotifier/* myuser@myhost:/opt/airnotifier/
  scp -r root@messages.moodle.net:/opt/airnotifier/* myuser@myhost:/opt/airnotifier/
  scp -r root@messages.moodle.net:/var/airnotifier/* myuser@myhost:/var/airnotifier/
  scp -r root@messages.moodle.net:/var/airnotifier/* myuser@myhost:/var/airnotifier/
'''Import the databases in the new server'''
mongorestore -h localhost --port 27017 -d airnotifier /var/airnotifier/airnotifier/
mongorestore -h localhost --port 27017 -d commoodlemoodlemobile /var/airnotifier/commoodlemoodlemobile/
mongorestore -h localhost --port 27017 -d commoodlemoodlemobiletest /var/airnotifier/commoodlemoodlemobiletest/

Revision as of 10:02, 16 October 2014

Sometimes it useful to have a local airnotifier instance for testing, in this document is described step by step how to migrate a working Airnotifier installation to a different server

Install the required dependencies for running airnotifier in the new server See https://github.com/airnotifier/airnotifier/wiki/Installation

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/


Copy the old installation files and databases to the new server

Using a local computer to route the traffic

scp -3 -r root@messages.moodle.net:/opt/airnotifier/* myuser@myhost:/opt/airnotifier/
scp -3 -r root@messages.moodle.net:/var/airnotifier/* myuser@myhost:/var/airnotifier/

Or directly between servers (messages.moodle.net will connect to myhost)

scp -r root@messages.moodle.net:/opt/airnotifier/* myuser@myhost:/opt/airnotifier/
scp -r root@messages.moodle.net:/var/airnotifier/* myuser@myhost:/var/airnotifier/

Import the databases in the new server

mongorestore -h localhost --port 27017 -d airnotifier /var/airnotifier/airnotifier/
mongorestore -h localhost --port 27017 -d commoodlemoodlemobile /var/airnotifier/commoodlemoodlemobile/
mongorestore -h localhost --port 27017 -d commoodlemoodlemobiletest /var/airnotifier/commoodlemoodlemobiletest/