Sunday, December 21, 2014

Kill restore process in new cpanel

Kill restore process in new cpanel

In new cpanel/WHM when we try to kill restore process it is still showing in WHM >> restore full backup. Below are the steps to remove that process from WHM.
You can manually mark the transfer as completed using the following instructions:
Ensure the transfer is no longer running by clicking on the “View” option under “Sessions in Progress” for this transfer. In the new window, there will be a line that looks like this:
You may close this window and view the transfer on the command line: /usr/local/cpanel/bin/view_transfer 1071601843quick20141013154952IAZhRro
Access your server via SSH and run that command (the transfer name will be different on your server):
/usr/local/cpanel/bin/view_transfer 1071601843quick20141013154952IAZhRro
As an example, you might see output like this:
Transfer running with pid: paused
[795 ][MASTER ]: Start Session
[795 ][MASTER ]: Version: 1.9
You will note that the master PID for this transfer is xxx. If the process still exists, and the transfer has failed, then you can kill that process:
kill -9 xxx
The next step requires you to change the entry for this transfer in the whmxfer.sessions table in MySQL. Find the entry with the session ID for your migration. In the example we have been using, it’s ‘ 1071601843quick20141013154952IAZhRro .’ It will look like this:
mysql -e “select * from whmxfer.sessions where sessionid=’1071601843quick20141013152137YIVT7Ze'”
+————————————–+————–+——-+———+———————–+————-+——-+———————+———+
| sessionid | initiator | pid | version | target_host | source_host | state | starttime | endtime |
+————————————–+————–+——-+———+———————–+————-+——-+———————+———+
| 1071601843quick20141013152137YIVT7Ze | quickrestore | 21295 | 1.9 | vps.techfix.com | localhost | 50 | 2014-11-15 09:11:17 | NULL |
+————————————–+————–+——-+———+———————–+————-+——-+———————+———+
You will need to change the ‘state’ field to 100, and change the ‘endtime’ field from NULL to a time after the ‘starttime’ field:
mysql -e “update whmxfer.sessions set state=’100′, endtime=’2014-10-14 09:37:52′ where sessionid=’1071601843quick20141013152137YIVT7Ze'”
If you check it again then you will notice that process ended.
+————————————–+————–+——-+———+———————–+————-+——-+———————+———————+
| sessionid | initiator | pid | version | target_host | source_host | state | starttime | endtime |
+————————————–+————–+——-+———+———————–+————-+——-+———————+———————+
| 1071601843quick20141013152137YIVT7Ze | quickrestore | 21295 | 1.9 | vps.techfix.com | localhost | 100 | 2014-10-13 08:21:37 | 2014-10-14 09:37:52 |
+————————————–+————–+——-+———+———————–+————-+——-+———————+———————+
The transfer should then no longer appear under “Sessions in Progress.”

You can reconfirm the same by login into WHM.

No comments:

Post a Comment