How to backup and restore Asterisk?

Hello everyone,

I inherited an Asterisk server from the former Sysadmin at my work. I know next to nothing when it comes to Asterisk and my first order of business is to back it up so I can be prepare for any disaster. I would like to know what I need to backup? We are using Asterisk as a gateway for Microsoft Lync Server 2010 to an Avaya PBX and the outside world. The version of Asterisk we’re running is 1.8.15 on a Centos 5.8 VM. I know some of the configuration files being used are extensions.conf, sip.conf and ooh323.conf. What else do I need to backup? Am I safe by just backing up the whole /etc/asterisk directory?

My other question is regarding the restore process. I plan to backup Asterisk by FTP to my file server. Can I restore Asterisk by copying back all the configuration files? What is the recommended restore process?

Thanks for any help you guys can provide!

Please use Asterisk Support for support questions.

The basic configuration, on a standard installation, is in /etc/asterisk/*. /var/lib/asterisk/astdb contains the basic persistent data.

/etc/asterisk/* may include files from other parts of the file system and may reference custom sound files from almost anywhere.

You may have to consider voice recordings and voicemailboxes.

/etc/asterisk/asterisk.conf contains pointers to all the directories that are used by default.

If you you actually have GUI front end, that will have its own files. The most common one is supported at

If it is using the real time feature, there will be a database somewhere. /var/log/asterisk/*csv contains the default call accounting records. Other accounting information may be in other parts of /var/log/asterisk.

On a simple system, a one time backup of /etc/asterisk/* will be enough.

I just found this topic, and I disagree with the answer given.
Saving /etc/asterisk/* will only get you configuration files.

From what you wrote, we know that you are using an “old” version of Asterisk.
I would highly recommand to backup not only the binaries, but all the modules, on the top of configuration files and user voicemail / accounting.

Let’s say that you currently have DIGIUM phones running.
This mean that you would need res_digium module, that does not come by default with Asterisk.

A good backup is a backup that you can restore, and make it work right away.

I would say


You shouldn’t be relying on backups made from the machine itself for executable code and fixed parts of the dialplan, given that the system is almost certainly exposed to the internet.

We actually create a custom RPM package for the fixed stuff and maintain the variable parts of the configuration offline, and install them from a tar file.

If you want a quick, no think, restore, do a physical backup of the whole disk and don’t worry about exactly what is included.