I created a backup with
# tar -cvpzf /run/media/user/XYZ/backup.tar.gz --exclude=/run/media/user/root/mnt /run/media/user/root/
now I need the backup and when I tried to extract the tar.gz archive I accidentally deleted the backup file:
#tar -xvpzf /run/media/user/XYZ/backup.tar.gz -C /run/media/user/otherDevice/
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
I got the error nearly instantly so I guess only some bits are overwritten. I still can see the file but its size is 0 Bytes. Partition type is NTFS. Can someone explain what happened and how to restore the file?
tar -xvpzf /run/media/user/XYZ/backup.tar.gz -C /run/media/user/otherDevice/
did not write to (or overwrite) the backup file – Chris Davies Dec 22 '23 at 19:06df -h /run/media/user/XYZ/
? – amphetamachine Jan 11 '24 at 18:18