Urgent - problem restoring tar.gz file

mchallice

Registered
Oct 29, 2019
2
0
1
UK
cPanel Access Level
Root Administrator
Original server has crashed. I now have a similar working server so I'm attempting to copy across the tar.gz back up files for each customer to restore each site.

I've used scp to copy the backup files across from the old server into the /home directory of the new server.

But. I'm getting the following error message when I try to run the restore:

" Failed to extract the archive at “/home/username.tar.gz”: The tar archive extraction failed because of the error “The “/usr/bin/gtar --no-same-owner --use-compress-program=/usr/local/cpanel/bin/gzip-wrapper --preserve-permissions --extract --directory /home/cpanelpkgrestore.TMP.work.948e1bb7/unsafe_to_read_archive --file /home/username.tar.gz” command (process 27088) reported error number 2 when it ended.”: pigz: skipping: <stdin>: corrupted -- incomplete deflate data /usr/bin/gtar: Unexpected EOF in archive /usr/bin/gtar: Unexpected EOF in archive /usr/bin/gtar: Error is not recoverable: exiting now "

Looks like a permissions thing to me, can anyone help please?
 
Last edited by a moderator:

cPanelLauren

Technical Support Community Manager
Staff member
Nov 14, 2017
13,252
1,234
313
Houston
Hello,

This doesn't look like a permissions error, this looks like the backup file is corrupted or incomplete based on: "Unexpected EOF in archive /usr/bin/gtar: Error is not recoverable: exiting now"

You might try and extract it manually and see if you get the same behavior.
 

mwabini

Member
Apr 27, 2019
6
1
3
Kenya
cPanel Access Level
Root Administrator
I have experienced the same error. I made a backup of an account and deleted it and now I cant restore the backup I've made. Is there an option to validate/verify cPanel backup files after backup is done to ensure they're restorable?
 

cPanelLauren

Technical Support Community Manager
Staff member
Nov 14, 2017
13,252
1,234
313
Houston
Hello,

You can test if a tar.gz file is valid by running something like:
Code:
gunzip -t file.tar.gz
and then further test if the tar file inside is valid by running:
Code:
gunzip -c file.tar.gz | tar t > /dev/null