help-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-tar] Tar command failed when compressing the sql file


From: sandeep vura
Subject: [Help-tar] Tar command failed when compressing the sql file
Date: Thu, 14 Jul 2016 09:09:41 +0530

Hi,

I am trying to compress one sql file using the below tar command. But it is getting failed without any warnings or exceptions in the error log. 

Syntax: tar --warning=no-file-changed -zcvf $bkpdir${hadoopdb}_mysqldb_$bkpday.sql.tar.gz $bkpdir${hadoopdb}_mysqldb_$bkpday.sql

Is there any way to catch the error when executing the above command.

My Code snippet looks like this.

   tar --warning=no-file-changed -zcvf $bkpdir${hadoopdb}_mysqldb_$bkpday.sql.tar.gz $bkpdir${hadoopdb}_mysqldb_$bkpday.sql

   if [ "$?" != 0 ]
   then
      echo "Error while compressing the db backup file"
      errmsg
      exit 1
   fi

Error Message: Error while compressing the db backup file

TAR Version : 1.23

Please do the needful.

Regards,
Sandeep.v

reply via email to

[Prev in Thread] Current Thread [Next in Thread]