Move Asterisk/FreePBX to new machine

I have used an older version of Asterisk/FreePBX for a while now, and decided that I needed to go to a different computer (it showed signs of getting sick). So, I downloaded the latest Distro (AsteriskNow 6.12), and have that running on the new machine. Now I need to transfer the setup from the old machine to the new one. How do I do that? The old setup is 32-bit, the new one is 64-bit, if that makes a difference.

two solutions

  1. if you do a FULL backup/restore that should get it done.
  2. if you want to make sure this is a clean install look at the bulk import/export function.
    I’m not sure if your old one will have it (depends on the version ?)

one thing to make mention of, is make sure any modules you are using in the old one are loaded on the new one… restore will not go well if, modules are not loaded.

Thanks. just to be sure, I ran a backup on the old system (How do I run a FULL backu?)? I then copied the tar.gz file onto a USB stick (using X windows on the old machine). X-windows is not running on the new machine (I think there is no video driver for the Intel chipset H110M), so I plugged the USB stick into my Windows PC and went to the PBX administration. I selected restore and browsed to the file on the USB stick, and said Go!, but the result is “Error verifying uploaded file”. What am I doing wrong?

I’m not familiar with any kind x windows, all my Linux experience is Centos with no gui… with that said, here’s how I move files around, WinSCP it’s a MS windows program that allows you to use SSH to get a GUI folder list on a Linux machine… make a full backup

grab Full backup and drag over to items…

save and run.

then use WinSCP to move the file from /var/spool/asterisk/backup… then the folder where it saves the backup, if you create a new one it will be in that folder.
to copy the file to your desktop.
connect to the new pbx using WinSCP and put it in the same place
then try your restore.

Hope that helps!

Thanks. I’ll give that a try. For some reason I cannot see the picture you posted, but I can download WinSCP. I usually use putty to access the Asterisk box, and Filezilla to deal with files. I forgot that I could probably use filezilla to move the files…
One thing: what do you mean by “grab a full backup”? I went into the Freepbx GUI, which has a “backup and restore” option. Is that the backup you are referring to? And what options would I choose for a full backup?

Pictures are not working…send me an email, and I’ll send you the pictures.


Hi Chase, I got your images (I think you can remove your email). It looks a bit different on my machine, but I did the following:

  1. back up the new installation
  2. Use WinSCP to move the backup file from the old machine to the backup directory of the new machine
  3. Run a “restore” on the new machine and selected the backup from the old machine.

It seems to have run, but when I try to log into the FreePBX WebGui to see how everything looks, I get an error mesage: “No direct script Access Allowed”. Any ideas?

hmm, not really, but maybe one of those experts will chime in… :slight_smile: I’m assuming you did the ole reboot after the restore?

sure did …

I think that perhaps the restore did work in some fashion. I had a complaint from someone that our phones didn’t work (and I verified that, no response). When I shut down the new setup, everything went back to normal with the old setup. So, something happened, but since I can’t log into the PBXGui, I have no idea how the new box is setup now. So, for the time being, it will stay off …

Backup and restore from different versions is problematic at best.

My recommendation for people trying to do this is to back-up the entire system (full backup) and copy it to a new machine, then use the upgrade scripts to move forward from your old version to the new version.

The “best” (and it still isn’t great) way to do this is to dump the configs and use the Bulk Handler. That, of course, has limitations and doesn’t cover all the bases, but it gets the phones back online relatively quickly in the case of an upgrade. It also handles the 32-bit/64-bit conversion problem nicely.

Hi Dave, I don’t know what exactly you mean. I have a system running on Centos5.5 with FreePBX 2.7 (I think). When you say “full backup”, do you mean a full backup of the entire (old) computer? I can try that, of course, but I don’t even know where to begin with the backup under Centos. And how would I restore that backup to a whole new computer with different hardware?
And what do you mean by “dump the configs and use the bulk handler”? I don’t see any “bulk export” in the Version 2.7 of FreePBX. The only thing “bulk” I see is a “bulk phone restart” in the modules…

A “full backup” on CentOS is as simple as “cpio -o outfile.cpio /” (updated to something that should work).

A full restore would be “cpio -I outfile.cpio /”. I’m working from memory, so there might be some options you want to add that I didn’t.

You could also so the same thing with tar: “tar -cvzf outfile.tgz /”, then copy the file “outfile.tgz” to the new computer and restore using “tar -xvzf outfile.tgz -C/”.

Older FreePBX didn’t use bulk handler - you dumped the configs using the “mass update” (???) module. It’s like the third or fourth option down on the pull-down. If your installation is so old that it doesn’t have that, you might not be able to use a CSV backup of your extensions.

I finally have some time to try this. the “cpio” command comes back with “too many arguments”. I suppose it doesn’t like the “find /”, so I am trying the tar option.
If everything works as it should, I suppose I would end up with a clone of my old system on the new hardware. What then? How do I update that then to the newer system (the one on the Asterisknow 6.12 distro or newer?

Ok, so that didn’t work. I couldn’t use the “cpio” command, as mentioned, and used the “tar” command. that created a tgz file that I transferred to the new computer and ran tar there. It seemd to do a bunch of stuff, then error after error ran over the screen. When I logged out and rebooted the system, it loads the old system still, but I can’t log in anymore. Whatever I enter, it says “login incorrect”. My guess is that has to do with the old system being 32-bit and the new system 64-bit, and most of the files I transferred with tar are simply not compatible.
So, back to square one. How do I transfer an existing Centos5.5/Asterisk??/Freepbx2.7 system to a new computer with the AsteriskNow 6.12 Distro?

After some searching I found (actually on this site) a repository with all the old distros, and some information how to upgrade. It seems that I first have to set up my second machine with a distro that is based on Centos 6.2, then backup and restore the setup from the old computer to the new, then somehow work my way up the distro chain. My problem now is that all the distros in the repository I have tried crash my computer. What is really weird is that I can install my old AsteriskNow 1.7.1 system on the new computer, and I can also install the AsteriskNow 6.12 distribution, but any distribution from the repository here ends in a crash. I downloaded varios ISOs and burned them to CD. They do start to install, but some crash after reboot, others crash already when they boot from the CD.

Crash details would help us troubleshoot.

Of course, but I don’t know how to get them. When I try to install one of the older distros from the repository here, they either crash when the installation starts, or after the installation when the computer reboots. Each time I see a bunch of error messages flying across the screen, and I end up with a hung computer that doesn’t respond. As I can only see the last page on the screen, the information is quite limited, and look to me like gibberish. The primary error message, however, is a “kernel panic”. I was able to see one that after a bit of googling pointed to an issue with power management, and I disabled that in the grub file. However the error message then changed to “Kernel Panic: swapper Tainted”, and I have not found any information about that yet. It also seems that this is only the last in a longer line of error messages that I can’t see because the the just simply disappear from the screen. And since I end up with an unresponsive system in every case, I have no idea how I would be able to get at any log files.
It is weird, though, that the two distros that work were NOT from the repository. I don’t remember where I got the old one from. I downloaded the new one (AsteriskNow) from somewhere else, possibly from this site, but not from the repository.