Restore Error -Solved

Backup of a new server (4.211.64-2)backs up fine, restore to SAME server works fine. Attempting to restore to different server with exact same version fails. Using restore function, I get “Invalid backup for or undefined error”. If I use “Choose file” and upload remote backup file, it errors out with “Unable to verify file”. I’ve tried to search it out on my own but zero luck. Thanks in advance if you can assist. Edit I created a brand new server, Asterisk v.11 same build (4.211.64-2)and attempted to restore from the other brand new server, with same results. Can someone advise if this is a RC bug or am I missing something? Thanks.Solved After 2 straight days, figured out that the permissions were changed once I downloaded file. Changed permissions from 0644 to 0777 and successfully restored both from “choose file” upload and restore from Legacy Local. Hope it helps.

bump

I have a very similar situation to the above message, but after changing permissions to 0777 on the backup, I still get unable to verify file on the upload of the backup file. Any thoughts? I am using 4.211.64-4 on both servers.

Thanks

Windows machines are notoriious for screwing with a file on upload. Just scp the backup onto the linux box in the backup directory

same problem. I scped it to the linux box. I changed permissions ans I still get error:
“Invalid backup for or undefined error”

I even tried with Config file only (smaller sized). Does the IP address of machine matter? I am trying to restore to a new machine.

For anyone looking for this in the future, I had the same problem. Solved by setting up vsftpd on the host (sudo service vsftpd start) and then used sftp on the client machine to drag the file over (using a get command). Hope this helps someone.

i still get “Invalid backup for or undefined error”. I have tried everything above for the last few days. anyone else have any suggestions?

Sorry, pal, haven’t seen that one before. The only thing I can suggest is to start again from square one with a brand new backup, make sure both systems are running the same versions of the same modules, and then ftp direct from one to the other to transfer the backup without any permission troubles. Then again, I’m pretty new to all of this myself, so someone else may have a better idea. Please remember to post back if you find a solution, though, in case anyone else (me!) has the same problem in future. :slight_smile:

both machines are Freepbx 2.11.0.11
both machines have Backup 2.11.0.4

I get “Invalid backup for or undefined error” when selecting the copied file (permissions changed to 0777 with WinSCP)

This is not good if I cant upgrade my machine with a backup!

Today, I got the same error. This is from a backup that I have restored from before, and the only difference is that it had passed from a Linux system to an NTFS system, and then back to a Linux system again (via FTP). It would appear that this is what corrupted the backup, as the systems were exactly the same, and I was able to restore from a backup from the day before.

I’d suggest that somehow the NTFS file system doesn’t only ruin permissions, but it actually corrupts the integrity of the file itself.

Not sure if anyone can shed light here, but I’m currently running through the uncompressed backup trying to combine it with one that works in order to restore a day’s worth of information.

You must change the permissions BEFORE you download it from the remote box. This was on a windows box using WinSCP to connect to FreePBX. If you attempt to change permissions after you have downloaded it, it will error. Don’t know why bit this was my experience. I used SCP to change the properties, not Linux, if it matters…

Apart from permissions (the file needs to be readable by the user asterisk) you can eliminate all the M$ b.s. by checking the md5sum of the file before and after moving it

on the original machine:-

md5sum backup.tarball

on the machine that will be restored to

md5sum backup.tarball

If they agree both to permissions and the md5sum and it still doesn’t work, there is something else wrong, like the versions of FreePBX are of a different “generation”.

you can use scp or rsync to RELIABLY copy files between all your linux boxes, just DON’T USE WINDOZE!!

That’s all folks.

I finally got my backup machine to successfully use file.

  1. Run Backup on Primary server and store locally.
  2. Connect to both machines using WinSCP.
  3. Find the backup .tgz at /var/spool/asterisk/backup and change permissions to 0777 using WinSCP.
  4. Duplicate file. the dialog window following allows selecting destination secondary server and location.
  5. Open up file on secondary using Restore which is now in the secondary machine’s local storage.

I have been having a hell of a time struggling with mounting USB drives, SSH nightmares, permissions settings, learning linux CLI for scp and changing sshd_config files. Nothing has really worked very well.

The above is the easiest way to get a backup file on the 2nd machine in my opinion.

so, I am basically cloning a 3rd machine for a 2nd office location. New install of freepbx. Make sure you run the “Default backup” once locally 1st, before trying to WinSCP the file over. The /backup directory isnt created until you run a backup on the new machine.