Ruijie Community

Title: How to migrate the MACC 3.0 database to new server with same version [Print this page]

Author: Levy    Time: 2017-8-22 10:21
Title: How to migrate the MACC 3.0 database to new server with same version
How to migrate the MACC 3.0 database to new server with same version

Author: admin    Time: 2017-8-22 10:23
If you need to back up all data of MACC-base, then need you follow the Database and MongoBD backup steps. If not, you can just backup the database only.
1.        Backup Database
Login to the server via SSH.
Command: mysqldump -umacc -p -R macc2 >/tmp/daily_all-databases_201X-XX-XX.sql
The password by default is “P@ssw0rd@macc2015”, referring on this path
(vi /macc/install/tomcat/macc_conf/properties/jdbc-dbcp.properties)

Copy or Download the sql file to PC.

2.        Backup the Mongo DB (devices and STAs record)
Command: mongodump -umacc -d macc2 -o /tmp/mongod_20170609
The password by default is “ma0c#2017#rj”, referring in
(vi /macc/install/tomcat/macc_conf/properties/mongodb.properties)

Copy or Download the mongo DB file to PC.

3.        Restore the database
Before restoring the database, please ensure the MACC-BASE version on new server should be same as original one. After migration, the license file will be expired. Please contact Ruijie Support in advance before migration.
Notes: it’s recommended that the IP address of new server should be same as the old one. Then you don’t need to modify the MACC URL on AP or DHCP pool.

1.        Upload the database and mongo DB file to new server under the /home folder. And login the new server via SSH.
2.        Exec “mysql -umacc -p”, password by default is “P@ssw0rd@macc2015”
3.        Exec “use macc2;”

4.        Use source command to restore the database.

4.        Restore the mongoDB
Command : mongorestore -umacc -d macc2  /home/mongod_20170609/macc2

5.        Migrate the files of the Firmware
Copy the /macc/data folder from the old sever to the new one.
6.        After all steps above, please restart the MACC-BASE server. Then access MACC web service: http://MACC BASE IP/




Welcome to Ruijie Community (https://community.ruijienetworks.com/) Powered by Discuz! X3.2