This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
en:faq:how_to_restore_system_from_a_backup_file [2015/05/15 06:33] liuxl |
en:faq:how_to_restore_system_from_a_backup_file [2017/12/12 03:05] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======How to Restore System from a Backup File====== | + | ====== How to Restore System from a Backup File ====== |
| - | =====Install a Same Version Astercc===== | + | ===== Install a Same Version Astercc ===== |
| For details:[[en:download_and_install:installation|asterCC Installation]] | For details:[[en:download_and_install:installation|asterCC Installation]] | ||
| - | =====Upload the Backup File to the New Server===== | + | ===== Upload the Backup File to the New Server ===== |
| For details:[[en:use_case:how_to_perform_system_backup|How to perform asterCC system backup]] | For details:[[en:use_case:how_to_perform_system_backup|How to perform asterCC system backup]] | ||
| - | =====Untar the Backup File===== | + | ===== Untar the Backup File ===== |
| First,you should enter the directory of the backup files that download via "wget" command,then execute commands following: | First,you should enter the directory of the backup files that download via "wget" command,then execute commands following: | ||
| Line 18: | Line 18: | ||
| - | =====Restore Database===== | + | ===== Restore Database ===== |
| - | ====Untar the Backup File of Database==== | + | ==== Untar the Backup File of Database ==== |
| After untar the backup file,we will untar the archive of database,we just need to execute commands following: | After untar the backup file,we will untar the archive of database,we just need to execute commands following: | ||
| Line 27: | Line 27: | ||
| - | ====Import the Backup File of Database==== | + | ==== Import the Backup File of Database ==== |
| Import backup files into the database through commands following: | Import backup files into the database through commands following: | ||
| Line 34: | Line 34: | ||
| <code> mysql -u root -p astercc10 < astercc_db.sql </code> | <code> mysql -u root -p astercc10 < astercc_db.sql </code> | ||
| - | At last,it prompts us to enter the secret of database.Under normal circumstances,the default secret is "astercc".Now,the importing of database is finished.If the configuration of the old server is different from the new one, 需要对新服务器配置文件进行3处手动修改: | + | At last,it prompts us to enter the secret of database.Under normal circumstances,the default secret is "astercc".Now,the importing of database is finished.We need modify 3 configurations of the new server manually which different from the old one: |
| - | 1.对astercc.conf→[database]中的相应信息进行修改,比如:dbname、username、password等等 | + | 1.In astercc.conf→[database],such as:dbname、username、password |
| <code> vim /opt/asterisk/scripts/astercc/astercc.conf </code> | <code> vim /opt/asterisk/scripts/astercc/astercc.conf </code> | ||
| - | 2.对astercc.conf→[statistics]中的相应信息进行修改,比如:dbname、dbpassword等等 | + | 2.In astercc.conf→[statistics],for example:dbname、dbpassword |
| <code> vim /opt/asterisk/scripts/astercc/astercc.conf </code> | <code> vim /opt/asterisk/scripts/astercc/astercc.conf </code> | ||
| - | 3.对database.php 最后面的 class DATABASE_CONFIG 中 default下的password、database等进行修改 | + | 3.At bottom of database.php,Under "class DATABASE_CONFIG -> default",for example:password、database |
| <code> vim /var/www/html/asterCC/app/config/database.php </code> | <code> vim /var/www/html/asterCC/app/config/database.php </code> | ||
| + | |||
| + | |||
| + | ===== Restore Folder ===== | ||
| + | |||
| + | Execute the following command one by one: | ||
| + | <code> \cp -rpf ./etc/* /etc </code> | ||
| + | <code> \cp -rpf ./opt/* /opt </code> | ||
| + | <code> \cp -rpf ./var/* /var </code> | ||
| + | |||
| + | |||
| + | ===== Reload the Configure Files of System ===== | ||
| + | |||
| + | After finished operations above,we should reloading the configure of system next. We just find "reloadconf.sh" in /opt/asterisk/scripts/astercc/ ,and execute it by "./" | ||
| + | <code> ./reloadconf.sh </code> | ||
| + | |||
| + | |||
| + | ===== Solutions for Problems ===== | ||
| + | After restoring astercc system,if you get "Permission denied!" after click the reload tip。You should execute command following: | ||
| + | |||
| + | <code> chmod 777 /var/www/html/asterCC/cake/console/cake </code> | ||
| + | |||
| + | After executing command,please restart asterccd,if it not worked,you can continue to execute commands following: | ||
| + | <code> chown -R asterisk.asterisk /var/www/html/asterCC/ | ||
| + | chown -R asterisk.asterisk /etc/asterisk | ||
| + | </code> | ||
| Line 50: | Line 75: | ||
| - | =====Restore Folder===== | ||
| - | restore folder: /var/spool/asterisk | ||
| - | restore folder: /var/www/html/astercc/data | ||
| - | restore folder: /var/lib/asterisk/ | ||
| - | restore folder: /var/www/html/astercc/statistics | ||
| - | =====Reload the Configure Files of System===== | ||