Backup and Restore
REASON: You want to backup all ScopTEL data for disaster recovery or you need to upgrade your Operating System from CentOSX to CentOSY
You need to copy recorded phone calls to remote location for backup
You need to copy voicemails and greetings to remote location for backup
You need to copy custom voicemail prompts to remote location for backup
You need to copy moh files to remote location for backup
You need to copy the entire server configuration to a MySQL file.
Before you can do a restore you must have a working ScopTEL server. You will need a new drive with all ScopTEL software pre-installed or you will need a ScopTEL ISO install DVD and an external DVD-ROM drive or other supported boot media.
WinSCP is the perfect resource for this but requires root access to the
ScopTEL (contact your vendor for root access)
Install the software on a Windows PC
Putty is the perfect resource to install command line software on a Windows PC but requires root access to the ScopTEL installation (contact your vendor for root access)
Install the software on a Windows PC
Refer to the websites for documentation of these applications and instructions on their usage.
BEFORE YOU BEGIN
If you are replacing an old server and doing a restore the hardware changes will cause the system code to change and you will require a new serial number. You must contact ScopServ to get a serial number for use in the new server or your new server will not have a working license.
Ensure you have a keyboard and monitor connected to the new server and the root password to make changes to the network configuration files after the restore process.
Document the MAC address for each Ethernet NIC in the new server because you will have to make changes to the ifcfg-eth* files after you do the restore from the old server.
WARNING:
Since you are restoring the scopserv.mysql file to a new server the the new server’s HWADDR addresses will be overwritten. These HWADDR configurations will have to be modified by editing the configuration files AFTER the Restore Process.
Old server example: /etc/sysconfig/network-scripts/ifcfg-eth0
# DO NOT EDIT THIS FILE
DEVICE=eth0
HWADDR=00:1F:D0:D8:5E:C2
IPV6INIT=no
IPV6_AUTOCONF=no
BOOTPROTO=dhcp ONBOOT=yes
PEERDNS=no
USERCTL=no
New server example: /etc/sysconfig/network-scripts/ifcfg-eth0
# DO NOT EDIT THIS FILE
DEVICE=eth0
HWADDR=00:1F:D0:C3:4F:A6
IPV6INIT=no
IPV6_AUTOCONF=no
BOOTPROTO=dhcp ONBOOT=yes
PEERDNS=no
USERCTL=no
BACKUP
In order to backup all configuration files to a single MySQL file use putty to execute the following commands omitting any quotation marks :
“mysqlcheck -A –r” This command checks and repairs the existing MySQL database. Use “mysqlcheck
On a standard system execute “mysqldump scopserv > scopserv.sql”. This command writes all configuration data including all reports to a single file named “scopserv.sql”.
If the server is the High Availability Master then execute “mysqldump scopserv > scopserv.sql” and “mysqldump scopserv_repl > scopserv_repl.sql”. These commands write all configuration data including all reports to files in the /root/ directory named “scopserv.sql” and “scopserv_repl”.
Start WinSCP on your desktop and login to the ScopTEL server using the username “root” and the root password (supplied by vendor).
Locate the /root folder to find scopserv.sql and scopserv_repl file(s) and drag and drop to a folder on your Windows PC.
Locate the /var/lib/asterisk/moh/ folder and drag and drop this file to a folder on your Windows PC to backup all music on hold files in the default moh folder.
Locate the /var/spool/asterisk/monitor folder and drag and drop this file to a folder on your Windows PC to backup all recorded phone calls.
Locate the /var/spool/asterisk/voicemail folder and drag and drop this file to a folder on your Windows PC to backup all voicemail greetings and voicemail messages.
Locate the /var/lib/asterisk/sounds/ folder and drag and drop this file to a folder on your Windows PC to backup all custom voice prompts.
Archives
If you have enabled archiving on your server you must also copy the archive folder to a remote folder using WinSCP.
Since the archive path is set by the admin manually you must find the path first using the GUI the download the contents using WinSCP.
Console - ifconfig
A newly installed server uses DHCP to get an IP address from a DHCP server on the network so make sure the public network interface is connected to the network so the server can get an IP address.
Before you can login to the server you must know the IP address of at least one physical interface.
From the Linux console login prompt, enter username ‘root’ omitting any quotation marks.
From the password prompt enter the default root password ‘scopserv’ omitting any quotation marks.
Once you are successfully logged as root type the command ‘ifconfig’ to determine at least one eth interface .
In this example the eth0 IP address is 192.168.192.60 Also notice that the HWaddr is the MAC address of the eth0 interface.
Console – nmtui
If there is no DHCP server on the network the server will not get an IP address.
Using the command ‘nmtui’ omitting any quotes an IP address can be set statically and then used to login to the GUI.
Use the tab key on the keyboard to select Edit a connection
Use the tab key on the keyboard to select the desired interface and press Enter
Use the tab key and keyboard arrows on the keyboard to select elements.
The Default is Automatic (DHCP)
To edit this connection Tab to <Automatic> and press Enter
Tab to Manual and press Enter
Keep using the keyboard to enter any static configurations, then tab or use arrows to select OK and press Enter
After pressing Enter use the <Back> button to exit nmtui
Console – service network restart
From the root prompt type ‘service network restart’ omitting any quotes to restart the network with the new static IP address.
RESTORE
To restore the configuration and reporting data in a standard installation you must upload the file “scopserv.sql” back to the /root/ folder in the new server. After the upload execute this command using Putty omitting any quotation marks while in the “/root/” folder.
“mysql scopserv < scopserv.sql”
To restore an High Availability system you must upload scopserv.sql and scopserv_repl files to /root/ and then execute:
mysql scopserv < scopserv.sql
mysql scopserv_repl < scopserv_repl.sql
Login to the new server’s GUI and make sure the license and serial number are valid after the restore since a new server will have a new System Code and the Serial Number will no longer be valid on the new server.
Login to each section of the GUI and edit the services to startup section and select each required service to startup. After saving each of the edited services to startup, click on the commit button to rewrite all MySQL configurations and config files.
During the backup process you downloaded additional folders to a remote Windows folder.
Using WinSCP drag and drop the backed up folders to the following ScopTEL folder locations to restore the files:
Upload Windows backup location of music on hold folder(s) to “/var/lib/asterisk/moh/”
Upload Windows backup location of recorded phone calls upload to “/var/spool/asterisk/monitor”
Upload Windows backup location of voicemail greetings and voicemails to “/var/spool/asterisk/voicemail”
Upload Windows backup location of custom voice prompts to /var/lib/asterisk/sounds/
Upload Windows backup location of custom archives folder to the path specified in Telephony>Configuration>Recording/Monitoring/Enable Archiving>Destination Folder
After all folders are restored to the new server the permissions must be fixed with the following commands issued as root (omitting “ marks)
“chown –R scopserv:scopserv /var/spool/asterisk/monitor”
“chown –R scopserv:scopserv /var/spool/asterisk/voicemail”
“chown –R scopserv:scopserv /var/lib/asterisk/moh”
“chown –R scopserv:scopserv /var/lib/asterisk/sounds”
“chown –R scopserv:scopserv <custom archive path>”
After restoring to a new server, follow this procedure
Login to the new server with the keyboard and monitor
Type the following commands omitting any quotes (nano is a text editor included in each ScopTEL installation)
‘service network stop’
‘cd /etc/sysconfig/network-scripts’
‘nano /etc/sysconfig/network-scripts/ifcfg-eth0’
Edit and replace the existing HWADDR with the corresponding MAC address from the NIC in the new server
Save the file
Repeat this process for each ifcfg-eth* file in the directory
‘service network start’
Login to the GUI and enter the new MAC address for each
interface Network>Interfaces>eth<x>>Hardware Address
(MAC):
Save and Commit.
After saving all changes to Telephony execute the upgrade script
/var/www/scopserv/telephony/scripts/update force
The last step is to reboot the server
To display your CentOS release information use putty: “cat /etc/redhat-release”
Centos4 commands:
“ifconfig” displays all network interfaces/IP addresses
“service network restart” restarts all network scripts
“cat” command prints a files' contents to the CLI console
“cd” command changes to a new directory
“reboot” issues a reboot command to the operating system
“shutdown –h now” shuts down the server (requires power button to turn server back on)
CentOS5 commands:
“ifconfig” displays all network interfaces/IP addresses
“service network restart” restarts all network scripts
“system-config-network” used to configure network interfaces
“cat” command prints a files contents to the CLI console
“cd” command changes to a new directory
“reboot” issues a reboot command to the operating system
“shutdown –h now” shuts down the server (requires power button to turn server back on)