Skip to main content

CPANEL-33281 - API - (enqueue_transfer_item) not overrite / force option working

Comments

5 comments

  • cPRex Jurassic Moderator
    Hey there! I wasn't able to reproduce this issue on my end. I've included the full API calls I used to do this test on my side, with a user that was already present on the Destination server: # whmapi1 create_remote_root_transfer_session remote_server_type=cpanel host=domain.com port=22 user=root password=password transfer_threads=1 restore_threads=1 unrestricted_restore=1 copy_reseller_privs=0 compressed=0 unencrypted=0 low_priority=0 --- data: analyze_rawout: "Fetching information from remote host: "domain.com" " "\nDone\nFetching information from remote host: "domain.com" " "\nDone\n" create_rawout: "Basic credential check " "\nDone\nFetching information from remote host: "domain.com" " "\nDone\nFetching WHM Version "\nDone\nCreating API Token "transfer-1608839841" on "domain.com". "\n{\"data\":{\"expires_at\":null,\"create_time\":1608839841,\"name\":\"transfer-1608839841\",\"token\":\"7AUDF07VJRW7N9Y6D27JD4DK6TRT3THU\"},\"metadata\":{\"result\":1,\"command\":\"api_token_create\",\"version\":1,\"reason\":\"OK\"}}Done\nTesting "domain.com" for transfer streaming support with password authentication "Streaming Supported\nrsync Supported\nRemote Server Type: WHM1164\n" transfer_session_id: domaincomcopya20201224195722fv8b metadata: command: create_remote_root_transfer_session reason: OK result: 1 version: 1 [root@10-2-32-250 ~]# whmapi1 enqueue_transfer_item module=AccountRemoteRoot user=cptest localuser=cptest transfer_session_id=domaincomcopya20201224195722fv8b overwrite_with_delete='1' --- metadata: command: enqueue_transfer_item reason: OK result: 1 version: 1 [root@10-2-32-250 ~]# whmapi1 start_transfer_session transfer_session_id=domaincomcopya20201224195722fv8b --- data: pid: 6370 metadata: command: start_transfer_session reason: OK result: 1 version: 1 [root@10-2-32-250 ~]# whmapi1 get_transfer_session_state transfer_session_id=domaincomcopya20201224195722fv8b --- data: state_name: COMPLETED metadata: command: get_transfer_session_state reason: OK result: 1 version: 1
    Is it possible there was an issue with the session setup that's leading to this error?
    0
  • pirulipipi
    Hey there! I wasn't able to reproduce this issue on my end. I've included the full API calls I used to do this test on my side, with a user that was already present on the Destination server: Is it possible there was an issue with the session setup that's leading to this error?

    Hi mate, Now I did same commands was you at the end I checked with /usr/local/cpanel/bin/view_transfer and still same error [root@dev]# whmapi1 create_remote_root_transfer_session remote_server_type=cpanel host=dev.hosting.com port=22 user=root sshkey_name=id_rsa transfer_threads=1 restore_threads=1 unrestricted_restore=1 copy_reseller_privs=0 compressed=0 unencrypted=0 low_priority=0 --- data: analyze_rawout: "Fetching information from remote host: "devcpanel.hosting.com" " "\nDone\nFetching information from remote host: "devcpanel.hosting.com" " "\nDone\n" create_rawout: "Basic credential check " "\nDone\nFetching information from remote host: "devcpanel.hosting.com" " "\nERROR: /bin/bash: line 7: export: `"': not a valid identifier\nERROR: /bin/bash: line 15: export: `"': not a valid identifier\nDone\nFetching WHM Version "\nDone\nCreating API Token "transfer-1608847065" on "devcpanel.hosting.com". "\n{\"metadata\":{\"result\":1,\"command\":\"api_token_create\",\"version\":1,\"reason\":\"OK\"},\"data\":{\"expires_at\":null,\"token\":\"HUZLTGGTUJCTVO7ORKNQBOP06K7CCLLA\",\"create_time\":1608847065,\"name\":\"transfer-1608847065\"}}Done\nTesting "devcpanel.hosting.com" for transfer streaming support with accesshash authentication "Streaming Supported\nrsync Supported\nRemote Server Type: WHM1164\n" transfer_session_id: devcpanelhostcopya20201224215746asp8 metadata: command: create_remote_root_transfer_session reason: OK result: 1 version: 1 [root@dev]# whmapi1 enqueue_transfer_item module=AccountRemoteRoot user=animalsshop2 localuser=animalsshop2 transfer_session_id=devcpanelhostcopya20201224215746asp8 overwrite_with_delete='1' --- metadata: command: enqueue_transfer_item reason: OK result: 1 version: 1 [root@dev]# whmapi1 start_transfer_session transfer_session_id=devcpanelhostcopya20201224215746asp8 --- data: pid: 2023826 metadata: command: start_transfer_session reason: OK result: 1 version: 1 [root@dev]# whmapi1 get_transfer_session_state transfer_session_id=devcpanelhostcopya20201224215746asp8 --- data: state_name: COMPLETED metadata: command: get_transfer_session_state reason: OK result: 1 version: 1 [root@dev]# /usr/local/cpanel/bin/view_transfer devcpanelhostcopya20201224215746asp8 The transfer for session ID "devcpanelhostcopya20201224215746asp8" is complete. [202382][MASTER ]: Start Session [202382][MASTER ]: Version: 2.3 [202382][MASTER ]: Queue "TRANSFER" items: 1 [202382][MASTER ]: Queue "RESTORE" items: 1 [202382][MASTER ]: Remote Host: dev.hosting.com [202382][TRANSFER:1]: Starting "Account": animalsshop2 [202382][TRANSFER:1][A:animalsshop2 ]: Progress: 0% (2020-12-24 21:59:16 +0000) [202382][TRANSFER:1][A:animalsshop2 ]: Starting "TRANSFER" for "Account" "animalsshop2". [202382][TRANSFER:1][A:animalsshop2 ]: Progress: 100% (2020-12-24 21:59:16 +0000) [202382][TRANSFER:1][A:animalsshop2 ]: Failed: User "animalsshop2" already exists on this system. [202382][TRANSFER:1]: Account "animalsshop2": User "animalsshop2" already exists on this system. [202382][TRANSFER:1]: Progress: 100% (2020-12-24 21:59:16 +0000) [202382][RESTORE:1 ][A:animalsshop2 ]: Starting "RESTORE" for "Account" "animalsshop2". [202382][RESTORE:1 ][A:animalsshop2 ]: Failed: User "animalsshop2" already exists on this system. [202382][RESTORE:1 ]: Account "animalsshop2": User "animalsshop2" already exists on this system. [202382][RESTORE:1 ]: Progress: 100% (2020-12-24 21:59:16 +0000) [202382][TRANSFER:1]: Child Complete [202382][RESTORE:1 ]: Child Complete [202382][MASTER ]: Session Complete [root@dev]#
    0
  • cPRex Jurassic Moderator
    Interesting - could you open a ticket with our team so we could investigate this directly on the system? If you could post the ticket number here I can keep the community updated with our findings.
    0
  • pirulipipi
    I received feedback from support team after opening ticket. Seems to be a error in API since or before version 88. Thank you for your help CPRex ;) [QUOTE] Description It has been brought to our attention that when using our API the variables force, skipaccount, and overwrite_with_delete are not allowing an existing account to be overwritten in cPanel version 88. A case has been filed and our developers are currently looking into this behavior. For reference, the case number is CPANEL-33281. Follow this article to receive an email notification when a solution is published in the product. Workaround Until a resolution has been published, you will need to utilize the WHM interface 'Home "Transfers "Transfer Tool' to transfer existing accounts.
    0
  • cPRex Jurassic Moderator
    Interesting - I didn't catch that on my end as it overwrote the account normally, but I'm glad they were able to point you to that article. I'm watching this case now on my end so I can update this thread once the issue is resolved.
    0

Please sign in to leave a comment.