Getting error while trying to unzip the file.

Hello Team,

I have written below code to zip the directory and all the files and folder under it, but getting an error whenever I am trying to download the file on windows machine and trying to unzip it.

Please help

catalogName="catalog";
catalogPath="/share/obiee/bidata/service_instances/ssi/metadata/content/"$catalogName;
backupDirectory="/u01/app/obiee/OBIEE_WebCat_Bkp/";
backupDate=$(date +%F);
backupName=$catalogName"_"$backupDate".zip";
cd $backupDirectory;
zip -r $backupName $catalogPath >> CatalogBackup.log;
find /u01/app/obiee/OBIEE_WebCat_Bkp/catalog* -mtime +6 -exec rm {} \;

Thanks a lot for your help

Getting what error?

1 Like

Hello Team,

whenever I am trying to download the file on my windows system via ftp and trying to unzip it, its getting error out saying file has been corrupted.

Can you please let me know if there is any other simple way to take daily backup of above folder.

Thanks & Regards,
Abhishek

Are you doing the FTP transfer in 'binary' mode? If not, that will be the problem.

Does it unzip correctly on your original host? Did you consider trying several different unzip pers on the windows side? Would it make sense to run unix2dos (or equivalent) before zip ping it?