1、Make sure install the same version of asterCC system
Install asterCC please view:【Goto Page】
Tips: Afetr installed the sysytem, make sure to install the same module as the original system.
2、Transfer the backup file to the new server
Please read the detailed operation:【Goto Page】
3、Unzip the system backup file
Goto the directory where the wget command to download the file, execute the following command to unzip the system backup file:
tar -xzvf astercc_files.tar.gz
4、Restore the database
4.1、Unzip databases file
After unzip the system backup file, execute the following command to unzip databases file:
gunzip -c astercc_db.sql.gz > astercc_db.sql
When complete, get file astercc_db.sql is the database backup file.
4.2、Import of database backups
To import a database backup, you need to execute the following command:
mysql -u root -p astercc10 < XXXX.sql
The “astercc10” for the new server database name, file “XXXX.sql” is the database unzip file, here “astercc_db.sql”, so the command is:
mysql -u root -p astercc10 < astercc_db.sql
Finally, enter the new server MySQL password, the default is: astercc. The database will be imported. To this step, has not completely ended, if the old server database does not use the default database information, you need to set the new server configuration file manual changes:
4.2.1、File astercc.conf → [database] in the corresponding information to be modified,for example:”dbname”、”username”、”password” should be modify.
vim /opt/asterisk/scripts/astercc/astercc.conf
4.2.2、File astercc.conf → [statistics] in the corresponding information to be modified,for example:”dbname”、”dbpassword” should be modify.
vim /opt/asterisk/scripts/astercc/astercc.conf
4.2.3、File database.php -> DATABASE_CONFIG -> var $default — > “password”, “database” should be modified.
vim /var/www/html/asterCC/app/config/database.php
5、Use the directory in the backup package to overwrite the appropriate directory
Use the unzip backup file to overwrite the appropriate directory,need execute the following command:
\cp -rpf ./etc/* /etc
\cp -rpf ./opt/* /opt
\cp -rpf ./var/* /var
6、The system prompts you to regenerate the configuration file
Import the database backup is completed, the system related file overwrited, you need to reload the new server, find the “reloadconf.sh” file can be executed after it.
/opt/asterisk/scripts/astercc/reloadconf.sh