CPanel Restore Script Deleting Home Directory and Failed To restore Data

Hi, I am having an issue in restoring Cpanel backup using The new Cpanel restore script provided by Cyberpanel’s New Update. It ended with an error and also deleting hole home directory with it.

Here what I did.

I spin up a VPS on Hatzner with Centos 7.
I logged via SSh and installed Cyberpanel With All Modules.
After Installing Cyber panel I created a folder /home/backup

[root@mail-server ~]# cd /home/
[root@mail-server home]# ls
cyberpanel docker vmail
[root@mail-server home]# mkdir backup

I copied a Cpanel Backup To that newly created folder via scp.

scp -i .\Master .\backup-7.3.2019_12-52-02_xxxxxxxxx.tar.gz

[root@mail-server home]# python /usr/local/CyberCP/plogical/ --path /home/backup/
Backup logs to be generated in /home/cyberpanel/9205
Extracting main cPanel archive file: /home/backup//backup-7.3.2019_12-52-02_xxxxxx.tar.gz

/home/backup//backup-7.3.2019_12-52-02_xxxxxx.tar.gz successfully extracted.

Creating main account from archive file: /home/backup//backup-7.3.2019_12-52-02_xxxxxx.tar.gz

Failed to create main website from backup file /home/backup//backup-7.3.2019_12-52-02_xxxxx.tar.gz, error message: [Errno 2] No such file or directory: ‘/home/backup/backup-7.3.2019_12-52-02_xxxx/userdata/main’.

[root@mail-server home]# ls
[root@mail-server home]# cd …
[root@mail-server /]# ls
bin dev home lib64 media opt proc run srv tmp var
boot etc lib lost+found mnt privkey.pem root sbin sys usr webadmin.csr
[root@mail-server /]# cd home/
[root@mail-server home]# ls
[root@mail-server home]# ls
[root@mail-server home]# ls

As you have seen, It failed to restore and also Deleted all contents From Home Directory. Please do something With it. It is a serious bug. and should be fixed Immediately.

Issue fixed.

how was this issue fixed??? i’m experiencing it :confused:

NVM. Got it. Just had to download the cPanel backup archive differently.

How was this fixed? I have the same issue.

Here you can read the bottom of my guide here: Migrate accounts from one control panel to another


You need to update step 5

Run this command from command line on CyberPanel (destination server): /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/ --path /home/backup

python path is now → /usr/local/CyberCP/bin/python

So update accordingly.