Restore account failed

Hedloff

Well-Known Member
Jun 7, 2004
180
11
168
Up north!
cPanel Access Level
DataCenter Provider
Hello,

We have customers that are moving from bluehost etc and when you download a backup from them the name on the file is:
backup-mon-mar-02-01_40_30-2015.tar

How can we restore that file?

Tried this:
Code:
[/home]# /scripts/restorepkg backup-mon-mar-02-01_40_30-2015.tar
cPanel restorepkg version: 2.2
Archive user:
Restricted: no
Allow Reseller Privileges: no

The system will attempt to restore the archive file â/home/backup-mon-mar-02-01_40_30-2015.tarâ
                                                                                               Failed to execute sql method do: DBD::mysql::db do failed: Column 'user' cannot be null at /usr/local/cpanel/Cpanel/DBBackend.pm line 154.
        Cpanel::DBBackend::_retried_sql(Whostmgr::Transfers::Session=HASH(0x5dd9ae8), "do", "INSERT INTO `AccountLocal_cpanelresto20150302095859If"...) called at /usr/local/cpanel/Cpanel/DBBackend.pm line 92
        Cpanel::DBBackend::_retried_do(Whostmgr::Transfers::Session=HASH(0x5dd9ae8), "INSERT INTO `AccountLocal_cpanelresto20150302095859If"...) called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1015
        Whostmgr::Transfers::Session::_insert_hashref_into(Whostmgr::Transfers::Session=HASH(0x5dd9ae8), __CPANEL_HIDDEN__, HASH(0x5e11968)) called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 555
        Whostmgr::Transfers::Session::enqueue(Whostmgr::Transfers::Session=HASH(0x5dd9ae8), "AccountLocal", HASH(0x5e11968), 30) called at bin/restorepkg.pl line 272
        bin::restorepkg::script("bin::restorepkg", "backup-mon-mar-02-01_40_30-2015.tar") called at bin/restorepkg.pl line 51
Since there aren't any username it is failing.
Have also tried renaming the file with username, but that is also failing?
 

storminternet

Well-Known Member
Nov 2, 2011
460
0
66
cPanel Access Level
Root Administrator
Have you created pkacct for the account with the cPanel username ? From your logs I can see pkgacct was made with the backup-mon-mar. Is that real cPanel username you are using for your domain.

You can either manually create your account on new server and upload it's data from old host via ftp.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
Hello :)

Are you sure these are backups generated through cPanel/WHM or the "/scripts/pkgacct" script? Or, is it possible your hosting provider is offering you custom backups? Do the contents extract in the same format as a backup generated through cPanel?

Thank you.
 

vigasdeep

Registered
Mar 23, 2015
1
0
1
India
cPanel Access Level
Root Administrator
Exactly the same error.

I created the cpmove file using
/scripts/pkgacct username
and trying to restore by using
/scripts/restorepkg username

in both command the cpmove-username.tar.gz was in /home/




Hello,

We have customers that are moving from bluehost etc and when you download a backup from them the name on the file is:
backup-mon-mar-02-01_40_30-2015.tar

How can we restore that file?

Tried this:
Code:
[/home]# /scripts/restorepkg backup-mon-mar-02-01_40_30-2015.tar
cPanel restorepkg version: 2.2
Archive user:
Restricted: no
Allow Reseller Privileges: no

The system will attempt to restore the archive file â/home/backup-mon-mar-02-01_40_30-2015.tarâ
                                                                                               Failed to execute sql method do: DBD::mysql::db do failed: Column 'user' cannot be null at /usr/local/cpanel/Cpanel/DBBackend.pm line 154.
        Cpanel::DBBackend::_retried_sql(Whostmgr::Transfers::Session=HASH(0x5dd9ae8), "do", "INSERT INTO `AccountLocal_cpanelresto20150302095859If"...) called at /usr/local/cpanel/Cpanel/DBBackend.pm line 92
        Cpanel::DBBackend::_retried_do(Whostmgr::Transfers::Session=HASH(0x5dd9ae8), "INSERT INTO `AccountLocal_cpanelresto20150302095859If"...) called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1015
        Whostmgr::Transfers::Session::_insert_hashref_into(Whostmgr::Transfers::Session=HASH(0x5dd9ae8), __CPANEL_HIDDEN__, HASH(0x5e11968)) called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 555
        Whostmgr::Transfers::Session::enqueue(Whostmgr::Transfers::Session=HASH(0x5dd9ae8), "AccountLocal", HASH(0x5e11968), 30) called at bin/restorepkg.pl line 272
        bin::restorepkg::script("bin::restorepkg", "backup-mon-mar-02-01_40_30-2015.tar") called at bin/restorepkg.pl line 51
Since there aren't any username it is failing.
Have also tried renaming the file with username, but that is also failing?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

elmister

Active Member
Mar 2, 2004
44
2
158
same problem here, with a backup created with pkgacct, deleted the account and when restoring got the same problem

did you solve the problem in these weeks?
 

elmister

Active Member
Mar 2, 2004
44
2
158
i finally could restore it, user account was still in /etc/passwd, for some reason there was still some files in /home/user/mail/domain.com/dovecot.*

removing the user ,deleting /home/user and running restorepkg with --force option solved it
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
I am happy to see you were able to resolve the issue. Thank you for updating us with the outcome.