Hi,
On Thursday, July 14, 2016 9:09:41 AM CEST sandeep vura wrote:
> 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.
when you have single file, it is usually task for compressor (xz, gzip..), not
archiver (tar):
$ gzip $bkpdir${hadoopdb}_mysqldb_$bkpday.sql
> 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.
> [..]
> TAR Version : 1.23
You haven't specified why tar failed, any guesses?
For example, if the '.sql' file doesn't exist, tar fails correctly for me. If
gzip is not executable, tar fails too.
Pavel