Difference between revisions of "Migration to other server"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: Line 1:
Login to Your system via ssh and make a double backup of your databases:
Login to Your system, shutdown asterisk and apache:
/etc/init.d/asterisk stop
/etc/init.d/httpd stop
 
This is needed to make sure you have ideal data in your new server.
Then make a backup of your databases:


   mkdir /root/backups
   mkdir /root/backups
Line 8: Line 14:
This will make an archived backup with your databases in /root/backups/alldatabases_BACKUP.tar.gz file
This will make an archived backup with your databases in /root/backups/alldatabases_BACKUP.tar.gz file


Download and leave a copy in some safe place like your workstation.
Download and leave a copy in some safe place, for example your workstation.


To extract files from archive do:
To extract files from archive do:
Line 14: Line 20:
   tar xvfz file_name.tar.gz
   tar xvfz file_name.tar.gz


Then a copies all remaining files like: /etc/asterisk directory (asterisk config files), /home/mor/config, /var/lib/asterisk/sounds , /var/spool/asterisk/monitor (recordings), /var/spool/asterisk/faxes, /home/mor/public/images/logo any other important files. Leave then is safe place.
Copy all remaining files like: '''/etc/asterisk directory (asterisk config files), /home/mor/config, /var/lib/asterisk/sounds , /var/spool/asterisk/monitor (recordings), /var/spool/asterisk/faxes, /home/mor/public/images/logo'''... any other important files which you think could be usefull in future.


Thats it, proceed with migration to other server.
Install new server.


After you finish installing new server, apply database to your new system, run /usr/src/mor/upgrade/'''Version'''/upgrade_to_'''Version'''.sh &&
After you finish installing new server, apply database to your new system, run /usr/src/mor/upgrade/'''Version'''/upgrade_to_'''Version'''.sh &&

Revision as of 14:53, 29 April 2009

Login to Your system, shutdown asterisk and apache:

/etc/init.d/asterisk stop
/etc/init.d/httpd stop

This is needed to make sure you have ideal data in your new server.

Then make a backup of your databases:
  mkdir /root/backups
  cd /root/backups
  mysqldump --all-databases -uDATABASEUSER -pDATABASEPASSWORD >/root/backups/alldatabases.sql
  tar -czvf alldatabases_BACKUP.tar.gz /root/backups/*.sql

This will make an archived backup with your databases in /root/backups/alldatabases_BACKUP.tar.gz file

Download and leave a copy in some safe place, for example your workstation.

To extract files from archive do:

  tar xvfz file_name.tar.gz

Copy all remaining files like: /etc/asterisk directory (asterisk config files), /home/mor/config, /var/lib/asterisk/sounds , /var/spool/asterisk/monitor (recordings), /var/spool/asterisk/faxes, /home/mor/public/images/logo... any other important files which you think could be usefull in future.

Install new server.

After you finish installing new server, apply database to your new system, run /usr/src/mor/upgrade/Version/upgrade_to_Version.sh && /usr/src/mor/upgrade/Version/fix_Version.sh .

Copy your old files to your new system.

If everything was smooth , its good idea to Change default passwords.