in reply to Combining or Merging 2 zip files.

Following is a CGI program I use to do just what you're describing. The file being uploaded is a zip file, whose members may or may not exist in the backup archive. Those members which exist, but with a different CRC, are updated; those which don't, simply added. I've left out some authorization code, which you should come up with to fit your situation. (You don't want malicious users backing up their files on your system!) I hope it helps. (Sorry 'bout the indents. SOPW seems to be a tab mangler.)
#!/usr/bin/perl -w use strict; use Archive::Zip; use CGI; use CGI::Carp qw(fatalsToBrowser); use Digest::MD5 qw(md5_base64); my $BackupPath = '/myserver/mybackupdir'; my $InpFile = $query->param('Backup'); undef $/; my $InpData = <$InpFile>; my $len = length($InpData); print "Content-type: text/plain\n\n"; my $NewFile; if ($len) { $NewFile = rename("$BackupPath/remote.zip", "$BackupPath/remote.ba +k") ? 'send.zip' : 'remote.zip'; open BAK, ">$BackupPath/$NewFile" or die "Can't open send.zip to wri +te: $!"; print BAK $InpData; close BAK; print "Received: $InpFile. Saved as: $NewFile. Length: $len bytes\n" +; } exit if $NewFile eq 'remote.zip'; my $local = Archive::Zip->new("$BackupPath/send.zip") or die "Can't ac +cess send.zip"; my @local_files = $local->members(); my $remote = Archive::Zip->new("$BackupPath/remote.bak") or die "Can't + access remote.bak"; my @remote_files = $remote->members(); my %remote_index; foreach (@remote_files) { $remote_index{$_->fileName()} = $_->crc32String() } foreach (@local_files) { my $name = $_->fileName(); print "$name: "; if (exists $remote_index{$name}) { if ($remote_index{$name} eq $_->crc32String()) { print "Exists unchanged.\n"; next } else { print "Needs updating.\n"; $remote->replaceMember($name, $_) } } else { print "Doesn't yet exist.\n"; $remote->addMember($_) } } $remote->writeToFileNamed("$BackupPath/remote.zip") && die "Error writ +ing remote.zip."; unlink "$BackupPath/remote.bak"; #Or not. I had to to keep from going +over my host's storage limit. print "*** Zip file updated. ***\n";