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.

Transfer tool and database names

Discussion in 'Data Protection' started by bouvrie, Oct 4, 2016.

Tags:
  1. bouvrie

    bouvrie Active Member

    Joined:
    Apr 6, 2012
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Copied from:

    Transfer tool leaves files behind and shows success

    Oh, and another thing we noticed when using the Transfer Tool: our old server stems from a time in which (legacy) MySQL imposed a maximum length on database names, truncating the accountname. I.e. we had an account /home/accountname, which in turn had a database called "accountn_database". This was fine and dandy, but the Transfer Tool decided to instead transfer that to an "acountname_database" database on the new server (running MariaDB). Weird, as I would think a transfer should make a 1:1 copy of an account's data from the source server, rather than use 'intelligence' to re-create a filesystem that may or may not match the source?
     
    #1 bouvrie, Oct 4, 2016
    Last edited by a moderator: Oct 5, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    This behavior is determined by the following option under the "SQL" tab in "WHM >> Tweak Settings":

    "Require a username prefix on names of new databases and database users"

    You can turn this "Off" on the destination server and the Transfer Tool will copy over the database name exactly as it's named on the source server. Would this address the concern you have with copied database name?

    Thank you.
     
  3. bouvrie

    bouvrie Active Member

    Joined:
    Apr 6, 2012
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Yes, this addresses the concern. However, I would suggest some textual notice/feed-forward in the Transfer Tool interface, as users may expect a Transfer Tool to copy the source data 1:1, including maintaining the same database names. In my experience with the tool, I was surprised that the destination server didn't receive a proper duplicate of the account, despite the tool claiming so. This database naming scheme conflict added to that.

    My migration/transfer is over now, so consider this case closed from my end.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm attempting to replicate this behavior in order to open an internal case to report the issue. I created a database under an account on a source server running cPanel version 58:

    cPanel username: accountusername
    Database Name: accountn_test1

    I then enabled database prefixing on the destination server (version 60/MariaDB enabled), and upon transferring the account, it correctly left the database name in place:

    Code:
    Restoring the database “accountn_test1” as “accountn_test1” …
    The system has created a new database named “accountn_test1”.
    Granting “accountusername” access to “accountn_test1” with temporary password …
    Connecting to MySQL server as “accountusername” in order to restore “accountn_test1”.
    Restoring database data for “accountn_test1”.
    The system has restored the contents of the database “accountn_test1”.
    Could you let us know what additional steps or environment variables we can change to reproduce this issue?

    Thank you.
     
  5. bouvrie

    bouvrie Active Member

    Joined:
    Apr 6, 2012
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Unfortunately, we've since retired the old server & are now running the new one. All I can remember is that the account in question was created several years back (with an old MySQL version 'current' at the time), and through the years influenced by multiple configuration changes (MySQL-->MariaDB, cPanel updates).

    Though, this issue coincided with issues using the Transfer Tool to transfer accounts. The database failed to restore in the process and had to be re-created manually. So I wouldn't exclude this being a manual error caused by human intervention. ;)
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Thank you for the additional information. I've been unable to reproduce this behavior on test systems, but feel free to open a support ticket if you encounter the problem again in the future, and we'll take a look at the specific server to determine what's happening.

    Thanks!
     
Loading...

Share This Page