Question

How do you terminate an active transfer when the transfer process no longer exists?

 

Answer

A transfer will still have an active session if the transfer process is terminated outside of the Review Transfers and Restores interface, such as when the server is rebooted while a transfer is running. This is because the transfer session's state is stored in an SQLite database and is not associated with a specific PID.

Warning: This workaround should only be implemented if the transfer (rsync) process no longer exists.

  1. Access the server's command line as the 'root' user via SSH or Terminal in WHM.
  2. Run the following command to identify the unfinished transfer's session ID:

    /usr//bin/sqlite3 /var/cpanel/transfer_sessions/whmxfer.sqlite "select sessionid from sessions where state != '100'"

  3. Run the following command to change the session ID to the completed state:

    /usr/bin/sqlite3 /var/cpanel/transfer_sessions/whmxfer.sqlite "update sessions set state='200', endtime=datetime('now') where sessionid='$sessionID'"

    Note: "$sessionID" must be replaced with the session ID found from the previous command.