restore fails with error

cPanel, Industry leading hosting platform with world-class support.
Post Reply
havri
Posts: 22
Joined: August 10th, 2017, 4:10 pm

restore fails with error

Post by havri »

Hello,

A client of ours just tried to fully restore his account and it failed. I know that it first terminates the user and then recreates the account from the jetbackup server. In this situation, it gives the following error:

Code: Select all

[07/May/2018 14:49:23 +0100] Letting the server to cool down for 8 seconds...DONE
[07/May/2018 14:49:31 +0100] Restoring account...FAILED
[07/May/2018 14:49:31 +0100] [ERROR] Missing item at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1110.
        Whostmgr::Transfers::Session::_set_state(Whostmgr::Transfers::Session=HASH(0x4ae2c70), HASH(0x4ae80f0)) called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 563
        Whostmgr::Transfers::Session::enqueue(Whostmgr::Transfers::Session=HASH(0x4ae2c70), "AccountLocal", HASH(0x4aef728), 30) called at bin/restorepkg.pl line 300
        bin::restorepkg::script("bin::restorepkg", "--allow_reseller", "--force", "/home/.jbm/restores/temp/MYCPANELUSER15257081418227/MYCPANELUSER") called at bin/restorepkg.pl line 53
Of course, after jetbackup deletes the account and the restore fails, the user is left with nothing (no cPanel username, no data, no way to get backups,etc).

The Jetbackup version that I'm using is the edge one:

Installed - EDGE Tier 3.2.15

Can someone fix this as soon as possible?

Thank you.
User avatar
elialum
Staff Member
Staff Member
Posts: 95
Joined: October 25th, 2015, 1:44 pm

Re: restore fails with error

Post by elialum »

Havri,

I am sorry for the inconvenience this may have caused you.
To restore the account quickly, please consider the manual way, here is a guide for that -

https://docs.jetapps.com/jetbackup/manu ... an-account

As for the issue, I was not able to reproduce this in our dev environment.

Can you please open a support ticket with so we can investigate this on your server ?

Thanks,
Eli.
havri
Posts: 22
Joined: August 10th, 2017, 4:10 pm

Re: restore fails with error

Post by havri »

Hello,

I re-analyzed the logs and looked into the account manually on the backup server. The snapshot from the date that the client was trying to restore from was actually empty, therefore your tutorial of manual restoration wasn't helping me. The backup being empty led to the error during the restore.

Searching further into the logs, I found that we had a mysql blockage on the server while the jetbackup backup process was also running, so I'm guessing that it caused the backup to not save anything from the user's home directory (the snapshot had only the sql dump file). Although the backup log showed that everything was ok, it didn't actually make a snapshot of homedir for some users.

As a future improvement, maybe you can make a hook that actually checks if the user was restored successfully. Otherwise, if the user does not appear in /var/cpanel/users/, /etc/trueuserowners or any other combination of cPanel files that actually prove that the user wasn't restored correctly, maybe you should restore the account as it was before the restoration process was initiated (especially if I'm using Safety Backups). After all of this, an email should be sent with the restoration conclusion.

As of now, there is no need to open a ticket, as I'm presuming that the empty backup was causing the error. If it happens again, I'll let you know.

Thank you.
User avatar
elialum
Staff Member
Staff Member
Posts: 95
Joined: October 25th, 2015, 1:44 pm

Re: restore fails with error

Post by elialum »

Havri,

I now noted you are running EDGE version.
We had a critical bug in JetBackup 3.2.14 causing the exact same scenario your are describing (empty backups). So any backup taken with version 3.2.14 is damaged and not usable.

This is fixed in JetBackup 3.2.15 which you are already updated to.

Can you verify with an account that was backed up using 3.2.15 that you can safely restore ?
havri
Posts: 22
Joined: August 10th, 2017, 4:10 pm

Re: restore fails with error

Post by havri »

Hello,

Yeah, it seems to work now. This month we had 3 backups done. One on 3rd of May, one on the 7th and one on the 10th. The one on the 7th was the one with problems (probably was running the bugged version), although not all users were affected. For example, the ones below were affected. On the 7th, their home dir wasn't backed up, therefore they occupy much less disk space:

Code: Select all

[root@jetbackup-my-server]# for user in ls ; do find -type d -iname "snap.2018-05*" -exec du -sh {} \; ; done
1.8G	./cpaneluser1/snap.2018-05-10.030458
1.8G	./cpaneluser1/snap.2018-05-03.025743
3.1M	./cpaneluser1/snap.2018-05-07.025916
37M		./cpaneluser2/snap.2018-05-10.030905
37M		./cpaneluser2/snap.2018-05-03.030104
56K		./cpaneluser2/snap.2018-05-07.030239
287M	./cpaneluser3/snap.2018-05-03.040339
287M	./cpaneluser3/snap.2018-05-10.045138
6.5M	./cpaneluser3/snap.2018-05-07.151404
Everything seems to be working ok now. Is there any way to mass delete the backups from that date from the interface or should I do from the command line? Also, how do I reindex all the backups after I delete them from the command line?

Thank you.
User avatar
elialum
Staff Member
Staff Member
Posts: 95
Joined: October 25th, 2015, 1:44 pm

Re: restore fails with error

Post by elialum »

Havri,

Thank you for getting back to us and confirming that the new release is working as expected.

The old snaps will be automatically cleared once they will get into their retention period, it is not advised to manually interfere with the process.

With the new JetBackup 3.2 engine there is no more live "indexing", we are keeping the data in a scheme file so if you manually change things, JetBackup will not be aware of it.

Thanks,
Eli.
Post Reply