Moving Asterisk to a new computer

I am wondering how difficult it is to move to a new set of hardware, possibly with a different IP address, with an already set up asterisk server? I’m new at this and deciding when it comes time to upgrade, precisely what will be required so I don’t end up burning time redoing everything later.

Would the better route in that kind of situation be to simply install Asterisk from scratch and redo all my settings, or is there a way to actually transfer the software to new hardware that is safer and hopefully faster?

Thanks in advance!

Perhaps this is not a good advice to give, since it is considered a good general practice to keep software as up-to-date as possible, but, you may consider virtualize your asterisk server.

Depending on what hardware it requires (PCI pass-through comes to mind) and how much power it demands from your processors, once virtualized, you will be free to move it to any new hardware because it will only require you to move the virtual machine.

I’ve already done that with other stuff but not with Asterisk, yet. :slight_smile:

1 Like

Thank you. I’ve been thinking of building it on VMWare ESXi.

However, it does bring up a follow up question:

Wouldn’t there be other disruptions from other hardware type changes such as a different IP address if the new server were in a different location? Or is the IP Adress used either irrelevant or easily changed in Asterisk?

If you move a virtual machine with Asterisk to a host on a different network, yes, you will have to change its IP address, network mask and default gateway, at least.

You can avoid much work, however, if all those that talk to your Asterisk (i.e.: phones and gateways) are using a FQDN (a full qualified domain name registered on DNS - something like my-asterisk.my-domain.com), because all you’ll have to do is update the DNS entry to the new IP address.

1 Like

I never would’ve thought of that! Definitely the path I’ll take. Will save lots of time long term!

Install the same version of Asterisk on the new machine and it should be as easy as transfering:

/var/lib/asterisk
/var/spool/asterisk/
/etc/asterisk

to the new machine from the old.

You will need to update any IP addresses in /etc/asterisk that reference the old IP.

If you are using ODBC you will likely need to re-create /etc/odbc.ini

1 Like

Very useful. Thanks!