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.

copying an account to same server

Discussion in 'General Discussion' started by wowway1, Jul 15, 2004.

  1. wowway1

    wowway1 Member

    Joined:
    Jul 15, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Hi all, I searched the forums here and couldn't find an answer to this question.

    I have an existing domain on a server that's fully functional, large site. What I want to do is setup a MIRROR copy of it on the SAME server assigned a different IP and accountname, so this will be my development bed going forward.

    Can I use the WHM 'copy another cpanel account' function to do this? Will this leave the source account unharmed and unchanged and just COPY the data, or does it move and delete the from the source account.
     
  2. civ

    civ Member

    Joined:
    Jan 3, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I am interested in knowing the same thing, so here's a *bump* :)
     
  3. matthewdavis

    matthewdavis Well-Known Member

    Joined:
    Jun 26, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    NC, USA
    I doubt this is possiable do to the unix base. Unix does not allow duplicate accounts. You'll have to rename the username. The easiest way to do this is to use the copy account command to a 2nd server (if you have one), then copy it back after renaming it on the 2nd server.
     
  4. civ

    civ Member

    Joined:
    Jan 3, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I suppose that is plausible in my case, however I hate to let DNS update by copying it to another server. I guess if TTL is lowered that won't really matter though.

    Anything wrong with backing up SQL and homedir files, then restoring into another account? Not as clean as a CPanel copy, but should work fine AFAIK.
     
  5. matthewdavis

    matthewdavis Well-Known Member

    Joined:
    Jun 26, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    NC, USA
    The DNS won't matter as long as the DNS servers with the registrar are not changed. You can copy & move it to as many servers as you like.

    There's nothing wrong with what you were asking. Keep in mind that the sql databases are prefix'd by the username, as are the sql users. The homedir won't be a problem as long as it's owned by the new user.
     
  6. civ

    civ Member

    Joined:
    Jan 3, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Thanks! Copied the site to a new username last night with no trouble. In case it helps anyone in the future, here's what I did:

    1) Created a new user account via WHM
    2) cp -R /home/olduser/* /home/newuser
    3) chown -R newuser:newuser /home/newuser/*
    4) Exported SQL from phpmyadmin for the old database
    5) Created new database, username in CPanel
    6) Added the new database username to the new database in Cpanel
    7) Imported SQL from step 4 back into the new database
    8) Updated any code referring to the old database to point to new database

    Thanks again :)
     
Loading...

Share This Page