Score:0

Corrupted TAR archive

ch flag

I'm reinstalling my pc and I made a TAR archive to backup my home folder (~22GO when compressed). When I reinstalled my system, I tried to extract the archive. It goes well until it says

tar: Skipping to next header

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

A big chunk of important data hasn't been extracted . Does anyone have any suggestions on how I can recover the remaining data? Thank you to every one who will respond

Additional information:

  • Distro: Ubuntu 23.04
  • Ext4 partition
  • File was stored on a microSD card (exFAT) and copied with rsync.
  • Command ran: tar -xvzf backup.tar.gz
  • Note: when I try reading the tar with -tvf on the key, the same error appears.
AlexFullinator avatar
ar flag
It is hard to provide explanations when there isn't much information on file systems, etc. What did you do differently when installing Ubuntu the 2nd time, what file systems did you use, did you install the correct archiver, etc.
Kertrix avatar
ch flag
@AlexFullinator Sorry about that, so I am and was on Ubuntu 23.04. I used the default settings on the install and I used tar to archive and extract the file. I'm on a ext4 partition. I put the archive on a microSD card and copied with rsync. Note: when I try reading the tar with -tvf on the key, the same error appears. Thank you!
hr flag
What was the filesystem on the sd card? I haven't been able to simulate the behavior, but it's suggested here [How can I extract from this tar file when my file may be corrupt?](https://serverfault.com/a/31765) that one cause may be blocks of zeros that mimic the end-of-archive - I'd try it first with a list command ex. `tar --list --ignore-zeros -f <yourfile.tar.gz>`
Kertrix avatar
ch flag
@steeldriver Unfortunately, the command resulted in the same error. I'll try the solutions suggested in the post you linked. Thanks! Btw the microSD is exFAT
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.