Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Building Telephony Systems With Asterisk (2005).pdf
Скачиваний:
45
Добавлен:
17.08.2013
Размер:
1.82 Mб
Скачать

Chapter 9

Rebuilding and Restoring the Asterisk Server

If the unthinkable happens and we lose our server due to hard disk failure or if we have to rebuild because of a system compromise, we need to know exactly how to get the server back online as fast as possible to minimize downtime.

There are a number of steps involved in this:

1.We rebuild the server, by following the instructions in the installation chapter. We follow exactly the same process up to the point of configuration. Since we have a backup of the configuration files, we can skip this part and replace the files with our backups later.

2.We replace the configuration files. We identify the latest usable backup, from which we extract the /etc/ directory. We then replace the operating system's configuration files we need and replace the /etc/asterisk directory. This ensures we have our previous configuration.

#!/bin/bash

$ tar xjvf asterisk_backup.tar.bz2 $ cp -R etc/asterisk /etc/asterisk

We follow a similar process for any other configuration files we wish to restore.

3.Data and Logs. We follow the same process as in Step 2, but this time restoring the /var/spool/asterisk and the /var/log/asterisk directories to their original locations as required, as well as restoring any other areas of the system we have backed up.

4.Permissions. The last thing we need to ensure is that Asterisk can read and write to the files necessary to function.

At this point we are able to restart the Asterisk server and verify that the system works properly by testing that we can make and receive calls and checking that all features of the system are functioning as they were previously. We could also ensure that no errors appear, after which it can be reintroduced back to its production environment.

Disaster Recovery Plan (DRP)

If during installation we document as much as possible and create a valid DRP, we will be able to get our Asterisk server back online with minimal disruption and effort. Since Asterisk is most likely an essential line of communication to partners and customers, downtime is an extremely important aspect to consider and creating a DRP should be addressed long before any disaster occurs.

Even something simple such as logging the installation process and documenting how to restore from backups is enough for at least a basic DRP, although it is recommended that we go further and create a full plan for not only the Asterisk server but also all other mission-critical services. We could also possibly have a layer of fault tolerance built into the system.

143