Skip to main content

Erase unused transfer sessions

Comments

3 comments

  • vanessa
    If they are not in use, just delete them from the filesystem directly. It won't break anything.
    0
  • cPanelMichael
    Hello, You may also find the following WHM API 1 function useful if you want to verify the transfer session has ended before deleting those files: WHM API 1 Functions - get_transfer_session_state - Software Development Kit - cPanel Documentation Thank you.
    0
  • Havri
    Hello, I'll do a follow-up on this thread. My initial question was somehow inexact. The thing that I wanted to do is a "cleanup" of the entries in WHM -> Review Transfers and Restores. In my case, I did some tests using the transfer tool and some were successful and some failed, while others were blocked in "ABORTING" state. To clean this up, I did the following steps: Check if the transfer session is running. You can get the transfer session id from WHM -> Review Transfers and Restores :
    whmapi1 get_transfer_session_state transfer_session_id=MY_ID
    Force the session to abort:
    whmapi1 abort_transfer_session transfer_session_id=MY_ID
    Enter the sqlite database:
    cd /var/cpanel/transfer_sessions/ sqlite3 whmxfer.sqlite
    Show tables:
    .tables
    Show table structure:
    .schema sessions
    Delete by session ID:
    DELETE from sessions WHERE sessionid = 'DELETE_SESSION_BY_SESSION_ID_ENTRY';
    Delete by PID:
    DELETE from sessions WHERE pid= 'MY_PID';
    Hope this helps someone.
    0

Please sign in to leave a comment.