Un-Tarring the Restore backup on Backup System

Hello,

This post is similar to post:
http://www.freepbx.org/forum/freepbx/general-help/failover-setup

I have 2 servers of identical setup with the following installed:
CentOS 5.2
PBX in a Flash 1.4
FreeBPX 2.5.2.2
Asterisk 1.4.21.2
Zaptel 1.4.12.1
Libpri 1.4.9

Currently, I have the production server creating weekly full backups. On the backup server I have a cronjob that transfers the production server’s tar ball over to /var/lib/asterisk/backups of the backup server. I can restore this backup manually using the FreePBX Restore Option and have tested it as a live server and it works great.

I would like to take this a step further by untarring the backup TAR on the backup server after it has been transferred.

The Question(s)
Since the the unTAR of the Asterisk system will place all the files in the propoer place, will this work in place of the Restore process within FreePBX?

Or, does the Restore process do other things?

If there are other steps the FreePBX Restore process does are are they so I can possibly automate these?

Thanks You very much!

Jason

tar is not some special “FreePBX” thing. tar or Tape ARchive has been around for 30+ years in System V Unix. I used it in College in the 70’s it still works the same way.

If you took 1/2 the time it took you to read the message you would see that tar expands the archives in the directory it is executed from and rebuilds the structure of the archive. This can be overridden by command line switches.

TAR is not really in question. The question is to be more specific, Does the “Restore” process of the FreePBX interface do anything inaddition to untarring the backup that I will need to account for?

Yes it does lots of things for the AstBD and MySQL. Please use the backup module. Version 2.8 or newer of FreePBX allow a restore from a primary box to a backup box on a schedule.

Do you know if there is a command-line option to restore a backup instead of ussing the FreePBX Web Interface?

Yes the GUI executes a script.

Since we don’t support you doing that I suggest you poke around in /var/lib/asterisk/bin. If you ask a specific question realize that you are doing this at your own peril.

So i tried this:

root@pbx:/var/lib/asterisk/bin# ./restore.php --restore=/backups/pbx/me/weekly_full/20130824-030901-1377338941-1560634985.tgz

then recieved this response:

restore.php options: --restore=< /path/to/backup/file >. Add --opts=< base64 encodes, serialized, array of options > --manifest=< /path/to/file >

What can i do next?
My issue is that i did an update a couple of days ago and all of a sudden my GUI stopped working!! It’s a blank webpage. I can’t restore from there

Please help.

I would reinstall freepbx from the tarball. Save version you had/trying to restore from.

Yeah, i guess even if i could restore it from command line, that prob wouldn’t fix freepbx anyways. Just seems odd that you can’t run a script from the command line (not like plp need an automatic restore every now and then :stuck_out_tongue: ).

Thanks

The tarball is from the command line tar.gz file. Unzip then run install_amp script.