Hi,
I have a big problem... I've written a script that uses gzip to compress log files then transfers them every night using Net::FTP to another machine. The script is running on a UNIX server and putting the files on a windows server. These log files are quite large, we are talking about 10megs compressed per day. The script runs every night and just transfers the previous days files for a series of virtual hosts.
Anyway, my problem is that the logs seem to becoming corrupted somewhere and once they are on the destination server I cannot uncompress them. When using WinZip I get the message 'Invalid Compressed Data -- unable to inflate.'
My first thought was that I needed to transfer the files in binary mode and maybe the default was ascii mode FTP, can anyone confirm this? I tried changing the mode type using $ftp->quot("bin") or die "Failed to change to binary type:$!"; because I could not find any other way of changing file transfer type. Can anyone tell me the proper way of doing this?
All comments and ideas very welcome, I need to get this sorted ASAP because we have clients screaming for their web stats....
Cheers!
Tom
In reply to Net::FTP Corrupting zip files by CodeJunkie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |