How to recover a corrupted tar.gz file in ubuntu
1) Insatall gzrt
#sudo apt-get install gzrt
2)Recover corrupted tar.gz file
#gzrecover my-corrupted-backup.tar.gz
This command will create a *.recovered file
3) Extract corrupted tar.gz file
#cpio -F my-corrupted-backup.tar.recovered -i -v
This command will extract files from corrupted tar.gz
cpio --> Copy file from archives
-F --> Read File
-i --> copy-in operation
-v --> lists file names as they are extracted
1) Insatall gzrt
#sudo apt-get install gzrt
2)Recover corrupted tar.gz file
#gzrecover my-corrupted-backup.tar.gz
This command will create a *.recovered file
3) Extract corrupted tar.gz file
#cpio -F my-corrupted-backup.tar.recovered -i -v
This command will extract files from corrupted tar.gz
cpio --> Copy file from archives
-F --> Read File
-i --> copy-in operation
-v --> lists file names as they are extracted