CodeJunkie has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::FTP Corrupting zip files
by robartes (Priest) on Mar 24, 2003 at 10:56 UTC | |
by CodeJunkie (Monk) on Mar 24, 2003 at 11:01 UTC | |
|
Re: Net::FTP Corrupting zip files
by jmcnamara (Monsignor) on Mar 24, 2003 at 11:00 UTC | |
by Anonymous Monk on Jun 30, 2015 at 15:30 UTC | |
|
Re: Net::FTP Corrupting zip files
by bronto (Priest) on Mar 24, 2003 at 12:12 UTC | |
by CodeJunkie (Monk) on Mar 24, 2003 at 14:06 UTC |