Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Erase unused transfer sessions

Discussion in 'General Discussion' started by Havri, Jun 7, 2017.

Tags:
  1. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    81
    Likes Received:
    17
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    I was trying out a few things with the WHM API and saw that a lot of transfer sessions were created. I found the in /var/cpanel/transfer_sessions:

    Code:
    drwx------   2 root root  4096 Jun  6 19:45 1761262021copya20170606154006hwq0XOI/
    drwx------   2 root root  4096 Jun  7 11:10 1921681051copya20170607081037Y5TBXMo/
    drwx------   2 root root  4096 Jun  7 11:12 1921681051copya2017060708123400MK85q/
    drwx------   2 root root  4096 Jun  7 11:15 1921681051copya20170607081457W7U2o0A/
    drwx------   2 root root  4096 Jun  7 11:24 1921681051copya20170607082447J1vqVPP/
    drwx------   2 root root  4096 Jun  7 11:25 1921681051copya20170607082535P336o8Z/
    drwx------   2 root root  4096 Jun  7 11:26 1921681051copya20170607082618OqD2Md4/
    drwx------   2 root root  4096 Jun  7 11:26 1921681051copya2017060708265565ckz0J/
    drwx------   2 root root  4096 Jun  7 12:07 1921681051copya20170607090755lqheY71/
    drwx------   2 root root  4096 Jun  7 13:46 1921681051copya201706070909476skYaIb/
    -rw-------   1 root root  5120 Jun  7 12:09 whmxfer.sqlite
    
    Is there a safe way to remove these sessions including from the WHMxfer database?

    Thank you.
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    29
    Trophy Points:
    178
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    If they are not in use, just delete them from the filesystem directly. It won't break anything.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    81
    Likes Received:
    17
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    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 :
    Code:
    whmapi1 get_transfer_session_state transfer_session_id=MY_ID
    
    Force the session to abort:
    Code:
    whmapi1 abort_transfer_session transfer_session_id=MY_ID
    
    Enter the sqlite database:
    Code:
    cd /var/cpanel/transfer_sessions/
    
    sqlite3 whmxfer.sqlite
    
    Show tables:
    Code:
    .tables
    
    Show table structure:
    Code:
    .schema sessions
    
    Delete by session ID:
    Code:
    DELETE from sessions WHERE sessionid = 'DELETE_SESSION_BY_SESSION_ID_ENTRY';
    
    Delete by PID:
    Code:
    DELETE from sessions WHERE pid= 'MY_PID';
    
    Hope this helps someone.
     
    cPanelMichael likes this.
Loading...
Similar Threads - Erase unused transfer
  1. dzamanakos
    Replies:
    3
    Views:
    194

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice