Backups appear to be corrupt

Status
Not open for further replies.

Oliver Broad

Free User
Joined
Feb 24, 2020
Messages
119
Reaction score
12
I'm trying to backup to a NAS via FTP. If I attempt to inspect or test the resulting zipfile it appears to be corrupted.

Is there a way to make 3CX test a backup to verify that it is actually valid without restoring from it?

Also are they regular ZIP files?
 
Hi, I'm having the same problem. I went to restore a site and it said the backup was corrupted. I then tried to unzip the file and it said the same thing. I backup dozens of sites and they all appear to have the same problem
 
do you use binary transfer on FTP folder ?
If FTP server use ascii mode during transfer you are mosrt of the time with a file corruption at the end.
 
Last edited:
You might want to try this thread, I was asking a similar question. As far as I can determine FTP truncates the file. Maybe it will work with one of the recommended FTP servers? 7-zip will open the damaged backups and on the one I checked the damage was confined to one of the voice prompt files.

In an emergency it might be possible to fix the backup with 7-zip by deleting the damaged file but I wouldn't bet on it.

I'm trying to use SMB, it works but I could only get it working by hacks at root level.

https://www.3cx.com/community/threa...dings-for-your-v16-update-4.70138/post-321969
 
Look guys if backup is corrupted is should report to you guys that something happened? Can you share us this informative information?
 
I appreciate your point and if you like I'll attempt to repeat the test and post any events it logged, but I'm almost certain that it reported success, and I only saw a problem when I tried to unzip the backup.

Otherwise all I can think of is to send you the two files so you can see the difference, but I'm almost certain it is just being cut slightly short, and I can only speculate that the FTP data channel might be being closed too early.

Hence the rule: If you don't test your backup then you don't have a backup

Oh and FWIW with that last "rule" I'm not referring to 3CX specifically, bad backup stories are legendary throughout IT like when every night someone loads a tape into the machine, and every morning they put the still-blank tape into a safe.
 
Last edited:
Well as the old IT saying goes, an untested backup is not a backup. That being said I'm surprised to read this but I'm assuming the fault is on the NAS or destination. 3CX tests the ZIP file before transmission and if the FTP server says the file transmits properly that's all it can do. If the NAS is reporting incorrectly or not writing it properly that's not 3CX's fault. Perhaps more folks will test their backups and report. It might help if you guys actually report some information like what version of 3CX, Windows vs Linux, NAS being used, etc.
 
  • Like
Reactions: JohnS_3CX
in previous time (using FTP proftpd on freenas) I've already got 3CX email notification for sucessful backup while on ftp folder it was a zero byte file written.
Being sure almost a backup is done should be with file checked on destination no?
 
The system can produce healthy backup, but the actual file transfer can become corrupted.
You can confirm this by changing the location to local, the backup produced should be healthy.

You will not receive a "backup failed" message from the PBX if the FTP server tells the PBX that the transfer was successful. The PBX cannot control what the FTP server does either, it has to rely on the 2xx message "received OK" to assume the backup was successfully transferred.

For the sake of troubleshooting, you can set up a Filezilla server on a pc and send the backup there.
https://www.3cx.com/docs/ftp-server-pbx-backups-windows/
 
OK well the result of that particular bit if troubleshooting is that the test transfer went through successfully.

Also I was surprised to find that setting a backup password doesn't appear to create a passworded zipfile, instead it presumably encrypts the zip file's contents. That might be a good thing, the zip format's protection can be very weak.
 
Ok that's good if the FileZilla server was successful. As for the NAS I can't really say, but if it can generate an FTP session log, it may be possible to see what went wrong. This might allow you to make some changes on the NAS or the firewall to improve the situation.
 
I don't think there's an FTP log. It can log backup jobs (rsync, though disguised) but I don't think it logs FTP. I'll see what else I can try as the target, I have a much older Buffalo NAS I could try.

I tried googling for truncation, and couldn't find anything Buffalo-specific.

Incidentally when I installed Filezilla server it wasn't automatically registered with Windows Firewall, so absolutely nothing happened until I added it manually. Not that that's anything to do with 3CX but if anyone else wants to try FZ they may need to do the same to get it to accept connections.
 
Last edited:
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,943
Messages
589,861
Members
164,834
Latest member
Edal