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_migrate_astercc_system [2015/12/06 09:08] liuxl [Database Recovery] |
en:faq:how_to_migrate_astercc_system [2017/12/12 03:05] (current) |
||
|---|---|---|---|
| Line 113: | Line 113: | ||
| <code> mysql -u root -p astercc10 < archive_name.sql </code> | <code> mysql -u root -p astercc10 < archive_name.sql </code> | ||
| - | <note tip> **Note**:The archive name is:astercc10. At last,input the password of root in mysql. You can see the information of mysql in /etc/astercc.conf. The "astercc10" is the database name on the new server,archive_name.sql unzip from backup file. </note> | + | <note tip> **Note**:The default archive name is "astercc10". At last,input the password of root in mysql. You can see the information of mysql in /etc/astercc.conf. The "astercc10" is the database name on the new server,archive_name.sql unzip from backup file. </note> |
| {{:zh:常见问题及解答:备份文件1_1_5.png?850|}} | {{:zh:常见问题及解答:备份文件1_1_5.png?850|}} | ||
| - | 到这一步,还没有完全结束,假如老服务器数据库没使用默认的数据库信息,则 需要对新服务器配置文件进行3处手动修改: | + | If the database on the old server use non-default information,we should revise the database information of new server,as follows: |
| - | 1.对astercc.conf->[database]中的相应信息进行修改,eg:dbname,password,etc | + | 1.Information in /etc/astercc.conf->[database],eg:dbname,password,etc |
| <code> vim /opt/asterisk/scripts/astercc/astercc.conf </code> | <code> vim /opt/asterisk/scripts/astercc/astercc.conf </code> | ||
| - | 2.对astercc.conf->[statistics]中的相应信息进行修改,eg:dbname,password,etc | + | 2.Information in /etc/astercc.conf->[statistics],eg:dbname,password,etc |
| <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等进行修改 <code> vim /var/www/html/asterCC/app/config/database.php </code> | + | 3.At the end of /var/www/html/asterCC/app/config/database.php->[class DATABASE_CONFIG]-> [var $default = array],password,database,prefix,etc |
| + | |||
| + | <code> vim /var/www/html/asterCC/app/config/database.php </code> | ||
| Line 135: | Line 137: | ||
| We selected many system file when backup,the list in [System]->[Backup Plans]->[Add Backupplan]->[Advanced]->[Backupfile] | We selected many system file when backup,the list in [System]->[Backup Plans]->[Add Backupplan]->[Advanced]->[Backupfile] | ||
| - | {{:zh:常见问题及解答:系统文件备份2.png?850|}} | + | {{:en:faq:backup_plans_2.png?750|}} |
| - | 备份好的系统配置文件是可以查看到的(黄框内的文件),我们将其解压(以 "_etc_" 开头的压缩包为例): | + | You can see the backup file of system config files (marked by yellow rectangle),we can unzip the .tar package execute below commands: |
| {{:zh:常见问题及解答:备份的配置文件.png?850|}} | {{:zh:常见问题及解答:备份的配置文件.png?850|}} | ||
| Decompress commands: | Decompress commands: | ||
| - | <code> tar -xzvf XXXXX.tar.gz </code> 将三条记录都解压,会出现一个叫 etc 的文件夹,解压完后有四个文件夹,将其四个及其目录下的所有文件夹、文件复制到新的服务器“相应”位置, 即: | + | |
| + | <code> tar -xzvf XXXXX.tar.gz </code> | ||
| + | |||
| + | Decompress all archive,then copy(or mv) all files and directories under original location correspondingly, i.e.: | ||
| <code> | <code> | ||
| \cp -rpf /BF.19.2015-02-28-16-08/etc/* /etc | \cp -rpf /BF.19.2015-02-28-16-08/etc/* /etc | ||
| Line 150: | Line 156: | ||
| </code> | </code> | ||
| - | 需要说明的是:\cp是在复制时,不提示覆盖信息用的,-r是有关目录的操作,-p是除复制源文件的内容外,还将把其修改时间和访问权限也复制到新文件中,-f是强行操作 慎重使用。 | + | Note:When use "\cp" (not cp) command to copy(or overwrite),there is no any overwrite information. -r:not only copy files,but also directories. -f:force |
| {{:zh:常见问题及解答:备份文件1_1_6.png?850|}} | {{:zh:常见问题及解答:备份文件1_1_6.png?850|}} | ||
| - | === 用代码实现即时性系统配置文件的转移(覆盖) === | + | === Copy(or Overwrite) the Config Files of System on Background === |
| - | 首先登录登录原来服务器(192.168.1.175),找到[系统设置]->[备份计划管理]->[添加/编辑 备份计划]->[高级资料]->[备份内容]下备份的文件及目录。 | + | |
| + | First,login the 192.168.1.175 server,you can see the backup files under [System]->[Backup Plans]->[Add Backupplan]->[Advanced]->[Backupfile] directory. | ||
| <code> | <code> | ||