linux - gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now -


i have bash script creates tar.gz , encrypts sends drive. cannot open .tar.gz afterwards. here process...

bash script encrypts.

#!/bin/sh  # tar automysqlbackup directory tar -zcf "red-backup-$(date '+%y-%m-%d').tar.gz" /var/lib/automysqlbackup/  # encrypt tar openssl aes-256-cbc -a -salt -in "red-backup-$(date '+%y-%m-%d').tar.gz" -out "red-backup-$(date '+%y-%m-%d').tar.gz.enc" -pass 'pass:mysecretpwd'  # remove original tar rm -rf "red-backup-$(date '+%y-%m-%d').tar.gz"  # upload google drive gdrive upload --file "red-backup-$(date '+%y-%m-%d').tar.gz.enc" -p "jofhriout849uioejfoiu09" 

then download file , use

sudo openssl aes-256-cbc -e -in red-backup-2016-09-22.tar.gz.enc -out red-backup-2016-09-22.tar.gz 

i enter passphrase file twice , file called

red-backup-2016-09-22.tar.gz 

when try

sudo tar -zxvf red-backup-2016-09-22.tar.gz 

and

gzip: stdin: not in gzip format tar: child returned status 1 tar: error not recoverable: exiting 

i have tried renaming file .tar , trying

sudo tar xvf red-backup-2016-09-22.tar.gz 

and

sudo tar xvf red-backup-2016-09-22.tar  tar: not tar archive tar: skipping next header tar: exiting failure status due previous errors 

any ideas going wrong?

this because of gzip version incompatibility.

check these points first:

which gzip

/usr/bin/gzip or /bin/gzip

it should either /bin/gzip or /usr/bin/gzip. if gzip points other gzip application please try removing path path env variable.

next is

gzip -v

gzip 1.3.5 (2002-09-30)

your problem can resolve these check points.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -