help-tar
[Top][All Lists]
Advanced

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

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


From: Pavel Raiskup
Subject: Re: [Help-tar] Tar command failed when compressing the sql file
Date: Thu, 14 Jul 2016 08:56:16 +0200
User-agent: KMail/5.2.2 (Linux/4.6.3-300.fc24.x86_64; KDE/5.23.0; x86_64; ; )

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




reply via email to

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