The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    53
    Likes Received:
    11
    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:
    824
    Likes Received:
    22
    Trophy Points:
    168
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  4. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    53
    Likes Received:
    11
    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. Olle Dahlquist
    Replies:
    5
    Views:
    665

Share This Page