HostOnNet Blog

Cpanel Transfer Tool – Failed to transfer site

Looking for Linux Server Admin or WordPress Expert? We can help.

When i transfer some sites from one server to another using Cpanel WHM > Transfer Tool, restore failed with following error

Failed to extract the archive at “/home/cpmove-filmshar.tar.gz”: _normalize_extracted_archive: The extracted archive does not contain a valid cpanel user file.
Removing copied archive “/home/cpmove-filmshar.tar.gz” from the local server …
Failed: Account Restore Failed: “Failed to extract the archive at “/home/cpmove-filmshar.tar.gz”: _normalize_extracted_archive: The extracted archive does not contain a valid cpanel user file.”

The error was

The extracted archive does not contain a valid cpanel user file.

I checked the Cpanel user file on source server (/var/cpanel/users/USERNAME), it was present and dont see anything wrong with it.

On contacting Cpanel support, got following reply

What you are describing sounds very familiar to an issue with the creation and extraction of tar archives.

Basically the whole archive is compressed, but when you extract it, it doesn’t fully extract everything, nor does it give you and error message.

That look dangerous, that means, you can’t trust a tar.gz backup file, if it is not going to give us any error message and only restore part of the files. It is good cpanel can detect it some way (not sure if it can detect it every time).

The solution they provided was to uncompress tar.gz backup file manually with –ignore-zeros option, then restore from that uncompressed backup.

Backup – Run on OLD Server

On source server, take backup of the account and move it to new server using scp.

/scripts/pkgacct USERNAME
scp -P 3333 /home/cpmove-USERNAME.tar.gz root@NEW-SERVER-IP:/home/

Restore – Run on OLD Server

Run following commands to restore site on new server.

mkdir /home/hon-restore
tar --directory=/home/hon-restore --ignore-zeros -xzf /home/cpmove-USERNAME.tar.gz
/scripts/restorepkg /home/hon-restore/cpmove-USERNAME/

If account is already present on server, you need to run restorepkg with –skipaccount option.

/scripts/restorepkg --skipaccount /home/hon-restore/cpmove-USERNAME/

Posted in Cpanel Server

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.