Backup and restore between different versions

I haven’t yet understood well how backup/restore works on FreePBX but will search for that, any good tutorial would be more than welcome.

But my main concern right now is I have been running version 1.8.23.1 on a PC for the past few months and I’ve just tried setting up on a Raspberry Pi with version 11.5.0 and found this impressive.

Is there a way to backup what I have on 1.8.23.1 and restore on 11.5.0?

If this works out I will probably move on to Beagle Bone Black.

Above, I was referring to Asterisk versions, FreePBX versions was 2.11.0.10 on the pi and 2.11.0.11 on PC.
I was able to make a full backup from the PC and tried to restore on the pi but nothing happened (no restore and no error or any message) I’ve upgraded the pi to 2.11.0.11 and still nothing.

Restoring FreePBX backups from one machine to another works fine if they are at the same level, e.g 2.11.0.10 to 2.11.0.11 is fine 2.10.x.y to 2.11.w.z will likely cause problems, how are you getting the data to the pi ?

I have done a full backup and downloaded to my Windows PC, then I tried to restore to the pi and it didn’t work. I followed the instructions in this video:

I suggest you don’t use anything windoze, when it doesn’t work (often) you will need to pay someone to fix it ;-).

Just rsync or scp the file into your backup directory (probable /var/spool/asterisk/backup/something, and a quick hint, make a backup of the empty new machine first named the same as the old machine backup, it will redusce you head scratching). In linux most every command has a “man page” so man rsync(or man scp) to get your hands dirty in linux.

You are right, trying to restore my backup to the original system from the file saved on my Windows box didn’t work either. I did however get an error message stating that the file couldn’t be verified.
I think I will order a BeagleBone and wait for this to arrive. I’ve setup an IAX2 trunk between the 2 PBX, and a queue on the pi, I’ve done loads of tests and it works but I sometimes loose the recordings. Perhaps it is not powerfull enough.
Thank you for the information.

Why would you spend more money on hardware?

At this point I am just testing, this is why I linked the pi to my PC PBX. My goal is (if it works well) to replace full size PC with a Beaglebone so I will save on power and space. Not sure the pi can do the job, I have 7 extensions, 3 DIDs (one for a Fax) 2 scheduled IVRs

The PI is more than enough. Extensions don’t matter. It’s concurrent calls, transcoding etc. We had over 100 phones registered to one once for fun.

I would say a pi can easily do 20 concurrent channels without transcoding. If you are running g.729 I would drop that number to 4 or 5.

An atom box of course smokes. A good dual core 533Mhz bus Atom can easily support a fully loaded PRI or 10 concurrent channels of transcoding. I run a little micro PC atom box at home, it has no moving parts and works like a champ. Before that I was running the whole house (12 extensions, 2 SIP trunks and 2 IAX trunks) off a 1Ghz Pentium 3 low profile IBM I fished out of a pile of trash.

Asterisk and FreePBX don’t have big requirements. CentOS gets fatter (needs more mem and HD) but it’s CPU footprint is still real small.

Here is my home machine. I use GSM on the IAX and g.729 on the SIP.

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU  330   @ 1.60GHz
stepping        : 2
cpu MHz         : 1597.138
cache size      : 512 KB
physical id     : 0
siblings        : 4

localhost*CLI> core show translation
         Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

            gsm  ulaw  alaw  g726 adpcm  slin lpc10  g729  ilbc g726aal2  g722 slin16 testlaw
      gsm     - 15000 15000 15000 15000  9000 15000 15000 15000    15000 17250  26250   15000
     ulaw 15000     -  9150 15000 15000  9000 15000 15000 15000    15000 17250  26250   15000
     alaw 15000  9150     - 15000 15000  9000 15000 15000 15000    15000 17250  26250   15000
     g726 15000 15000 15000     - 15000  9000 15000 15000 15000    15000 17250  26250   15000
    adpcm 15000 15000 15000 15000     -  9000 15000 15000 15000    15000 17250  26250   15000
     slin  6000  6000  6000  6000  6000     -  6000  6000  6000     6000  8250  17250    6000
    lpc10 15000 15000 15000 15000 15000  9000     - 15000 15000    15000 17250  26250   15000
     g729 15000 15000 15000 15000 15000  9000 15000     - 15000    15000 17250  26250   15000
     ilbc 15000 15000 15000 15000 15000  9000 15000 15000     -    15000 17250  26250   15000
 g726aal2 15000 15000 15000 15000 15000  9000 15000 15000 15000        - 17250  26250   15000
     g722 15600 15600 15600 15600 15600  9600 15600 15600 15600    15600     -   9000   15600
   slin16 21600 21600 21600 21600 21600 15600 21600 21600 21600    21600  6000      -   21600
  testlaw 15000 15000 15000 15000 15000  9000 15000 15000 15000    15000 17250  26250       -
localhost*CLI> sip show peers
15 sip peers 
localhost*CLI>

Wow this is impressive, I was under the impression the pi was overloaded as when watching its status I sometimes see the CPU peak at 100% but briefly. I will definitely give it more chance because I have an i7 with 8GB RAM and 1TB and this is overkill by far.

As I understand g729 would reduce bandwidth usage at the cost of CPU processing?
I presently have 10Mb/1Mb and going to 20mb/10mb. In your opinion would I benefit from going g729?

I may still move to the Beagle bone at one point because I am not to crazy about relying on the SD card. And I am hoping there will be a way for me to define only calls recording and voice-mail on an add on SD card?

Ok I have a small issue now, from the stable version on the PC I did a full backup+Voicemail+Audio and used rsync to copy to the pi.
Then I did a restore of this on the pi, I checked everything to restore all.
This is the result on the restore log:

Intialized!! Intializing Restore... Running pre-restore hooks, if any... Restoring files... /bin/tar: ./etc/dahdi: Cannot mkdir: Permission denied /bin/tar: ./etc/dahdi: Cannot mkdir: Permission denied /bin/tar: ./etc/dahdi/init.conf: Cannot open: No such file or directory /bin/tar: ./etc/dahdi: Cannot mkdir: Permission denied /bin/tar: ./etc/dahdi/genconf_parameters: Cannot open: No such file or directory /bin/tar: ./etc/dahdi: Cannot mkdir: Permission denied /bin/tar: ./etc/dahdi/system.conf: Cannot open: No such file or directory /bin/tar: ./etc/dahdi: Cannot mkdir: Permission denied /bin/tar: ./etc/dahdi/modules: Cannot open: No such file or directory /bin/tar: Exiting with failure status due to previous errors File restore complete! Restoring CDR's... Getting CDR size... Processed 17% of CDR's (13,576/78,193 lines) Processed 41% of CDR's (32,700/78,193 lines) Processed 66% of CDR's (51,694/78,193 lines) Processed 89% of CDR's (70,356/78,193 lines) Processed 100% of CDR's! Restoring CDR's complete Restoring settings... Getting Settings size... Processed 63% of Settings' (17,364/27,522 lines) Processed 100% of Settings'! Restoring astDB... Restoring Settings' complete Running post-restore hooks, if any... Cleaning up... Restore complete! Reloading... Done! I am thinking the errors may be because the root on PC has a different password than the root on the pi?

And now when i go to the web gui all I get is this message on a white page:

calllimit 2.11.0.3 Copyright 2013 by Schmoozecom, Inc., All rights reserved By installing, copying, downloading, distributing, inspecting or using the materials provided herewith, you agree to all of the terms of use as outlined in our End User Agreement which can be found and reviewed at www.schmoozecom.com/cmeula built Thu, 03 Oct 2013 19:51:22 +0000 (1380829882) @r24985

You probably need to install dahdi on the pi to eliminate those errors . It is but there is usually little need of it on a domestic machine without hardware endpoints.

I’ve reloaded a fresh image on the pi, made sure all the modules are at the same level as the PC and installed dahdi on the pi.
I’ve set the same root password on pi as the PC
This time I got no error, restore completed successfully but I am still getting that text on a white page after rebooting the pi.
I can ssh to it, any thing I can do to get it back with new configuration?

Not going so well…
Here is what I’ve done:

cd /usr/src/freepbx-2.11.0beta1
rm -rf /var/www/html/admin
./install_amp

I got the Web GUI back but 52 broken modules which are probably all modules installed. Tried to install the broken modules but that didn’t work. Tried to click in the red “Apply Config” but that didn’t work…

At this point I am thinking the version available for Raspberry Pi cannot be restored from a full blown version or there is a special trick to do.

Two options come to mind, find and use RasPBX which works OOTB or start with

./install_amp --help (or -h)

if you want to roll your own.

I think you might still need to compile dahdi on RasPBX but as I say it will work well without it except for the mostesoteric cases.