Remote Backup options

Hello Everyone,
I have been trying to configure the Remote Backup Options in FreePBX 2.9 to pull a backup from my primary server to my secondary server and automatically restore it to the secondary server. Here is what I have done so far.

  1. I created the public/Private key pair. By running “sudo -u asterisk ssh-keygen” on my secondary server.

  2. I then copied the public key to my primary server by running
    "sudo -u asterisk ssh-copy-id -i /var/lib/asterisk/.ssh/id_rsa.pub root@primary_ip

  3. I tested the key from the secondary server to the primary server by running this command, sudo -u asterisk ssh -i /var/lib/asterisk/.ssh/id_rsa root@primary_ip" and I was able to login without a password.

  4. On the secondary system I set up the Remote Backup Options as:
    Remote SSH Hostname = Primary_IP
    Remote SSH User = root
    Remote SSH Key = /var/lib/asterisk/.ssh/id_rsa

and checked the “Restore to this server” button.

I then chose to run the backup now and hit the “Submit Changes” button and there was a long pause and nothing happened.

I could see the folder and backup file were being created on the primary server, but not being transferred and restored to teh secondary server.

I found the logs for this are stored in /etc/httpd/logs/error_log so I looked in that file. I was receiving errors similar to this bug ticket,http://www.freepbx.org/trac/ticket/5021.

I upgraded from 2.9.0.2 to Backup & Restore module 2.9.0.3 and tried again. This time there was a long pause, but the backup file was never created on the primary server.

I’m now stumped and looking for some help. I have posted the Apache log below in case it is useful.

Killed by signal 15.
[Wed Jul 13 22:40:05 2011] [notice] caught SIGTERM, shutting down
[Wed Jul 13 22:43:39 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 13 22:43:39 2011] [notice] Digest: generating secret for digest authentication …
[Wed Jul 13 22:43:39 2011] [notice] Digest: done
[Wed Jul 13 22:43:40 2011] [notice] Apache/2.2.3 (CentOS) configured – resuming normal operations
scp: /backups/Production_Backup/192.168.2.17.20110713.22.45.46.tar.gz: No such file or directory
/bin/tar: /var/lib/asterisk/backups/Production_Backup/192.168.2.17.20110713.22.45.46.tar.gz: Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/voicemail.tar.gz: Not found in archive
/bin/tar: Error exit delayed from previous errors

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error exit delayed from previous errors
/bin/tar: /var/lib/asterisk/backups/Production_Backup/192.168.2.17.20110713.22.45.46.tar.gz: Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/recordings.tar.gz: Not found in archive
/bin/tar: Error exit delayed from previous errors

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error exit delayed from previous errors
/bin/tar: /var/lib/asterisk/backups/Production_Backup/192.168.2.17.20110713.22.45.46.tar.gz: Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/configurations.tar.gz: Not found in archive
/bin/tar: Error exit delayed from previous errors

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error exit delayed from previous errors
/bin/tar: /var/lib/asterisk/backups/Production_Backup/192.168.2.17.20110713.22.45.46.tar.gz: Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/fop.tar.gz: Not found in archive
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/cdr.tar.gz: Not found in archive
/bin/tar: Error exit delayed from previous errors

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error exit delayed from previous errors
/bin/tar: /var/lib/asterisk/backups/Production_Backup/192.168.2.17.20110713.22.45.46.tar.gz: Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/asterisk.sql: Not found in archive
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/asteriskcdr.sql: Not found in archive
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/astdb.dump: Not found in archive
/bin/tar: Error exit delayed from previous errors
sh: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/asterisk.sql: No such file or directory
sh: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/asteriskcdr.sql: No such file or directory
/bin/tar: /var/lib/asterisk/backups/Production_Backup/192.168.2.17.20110713.22.45.46.tar.gz: Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: /tmp/ampbackups.192.168.2.17.20110713.22.45.46/phoneconfig.tar.gz: Not found in archive
/bin/tar: Error exit delayed from previous errors

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error exit delayed from previous errors

Everything has been corrected. The updated version of the module was installed on the primary server and that resolved the issue.