How to debug: tar: A lone zero block
Your file is either truncated or corrupted, so xz
can't get to the end of the data. tar
complains because the archive stops in the middle, which is logical since xz
didn't manage to read the whole data.
Run the following commands to check where the problem is:
cat /var/www/bak/db/2017-05-20-1200_mysql.tar.xz >/dev/null
xzcat /var/www/bak/db/2017-05-20-1200_mysql.tar.xz >/dev/null
If cat
complains then the file is corrupted on the disk and the operating system detected the corruption. Check the kernel logs for more information; usually the disk needs to be replaced at this point. If only xz
complains then the OS didn't detect any corruption but the file is nevertheless not valid (either corrupted or truncated). Either way, you aren't going to be able to recover this file. You'll need to get it back from your offline backups.