cpanel-restore-fail

cpanel restore broken and cannot complete still shows on cpanel restore page

cpanel restore broken and cannot complete still shows on cpanel restore page

New version of Cpanel restore has improved the way, On how restoration works
Now, You can close the account restoration page and it will complete not unlike the old method of having the restore page alive.

However, on this new version there few problems & bugs, I hope the cpanel team will resolve it in coming versions.

The problem is some times, when the cpanel restore fails or canceled manually. the process on the cpanel restore page it still says in-progress.

We can resolve this in few easy steps.

Say, for an example we take Restore id : 1031412251quick20140821045631RwHA6Yo

The “1031412251quick20140821045631RwHA6Yo” restore process had ended a long time ago, but because it apparently didn’t end normally, the whmxfer.sessions table hadn’t been updated. So this is why we are still shows a message that the restore was running, as the table still showed it hadn’t completed.

We need to edit the MySQL database for transfers/restores, whmxfer. If you think a restore is no longer running,

The we need to find the restore ID.
In our case it is : 1031412251quick20140821045631RwHA6Yo.

Next, you will want to find out the process ID of this restore. You can do so by running the following:

# /usr/local/cpanel/bin/view_transfer 1031412251quick20140821045631RwHA6Yo

This will give you an output similar to this:

Transfer running with pid: 795
[795   ][MASTER     ]: Start Session
[795   ][MASTER     ]: Version: 1.9
[795   ][MASTER     ]: Queue “TRANSFER” items: 1
[795   ][MASTER     ]: Queue “RESTORE” items: 1
[795   ][MASTER     ]: Remote Host: 10.5.40.56
[797   ][TRANSFER:1 ]: Starting Account: “cptest”

As we can see, the process ID of this restore is 795.

Now we can check to see if this process is even running.

If it is, then the restore may still be running, and you should make sure that it is hung or going to fail.

If you think it isn’t going to work, then kill the process.

Next you will need to edit the whmxfer.sessions table in MySQL.

You can search this table by the restore ID:

mysql -e "select * from whmxfer.sessions where sessionid='1054056copya201407021337529eG8A76iJY'"

This will give you a table that looks like so:

+--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------+
| sessionid                            | initiator | pid  | version | target_host               | source_host | state | starttime           | endtime |
+--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------+
| 1054056copya201407021337529eG8A76iJY | copyacct  |  795 |     1.9 | nt12741.product.cpanel.vm | 10.5.40.56  |    20 | 2014-07-02 08:37:52 | NULL    |
+--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------+

We need to update the “state” field to 100, and provide a time for the “endtime” field (something after the starttime field). Here is what you would write to update the table:

# mysql -e "update whmxfer.sessions set state='100', endtime='2015-02-01 09:37:52' where sessionid='1054056copya201407021337529eG8A76iJY'"

And then you can check to make sure it is updated by running this command again:

# mysql -e "select * from whmxfer.sessions where sessionid='1054056copya201407021337529eG8A76iJY'"

that’s all,

+--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------------------+
| sessionid                            | initiator | pid  | version | target_host               | source_host | state | starttime           | endtime             |
+--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------------------+
| 1054056copya201407021337529eG8A76iJY | copyacct  |  795 |     1.9 | nt12741.product.cpanel.vm | 10.5.40.56  |   100 | 2014-07-02 08:37:52 | 2015-02-01 09:37:52 |
+--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------------------+

Make sure, You do take backups if required before starting this. We test it on live and test servers before posting.

Keep watching for more Posts. More CPanel Related post @ https://www.earneasy.net/tag/cpanel/

And at the end, You can always create a ticket with cpanel to resolve any kind of issues related to cpanel @ https://tickets.cpanel.net/

Comments

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