Results 1 to 6 of 6

Thread: copying an account to same server

  1. #1
    Registered Member
    Join Date
    Jul 2004
    Posts
    18

    Default copying an account to same server

    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. #2
    civ
    civ is offline
    Registered Member
    Join Date
    Jan 2004
    Posts
    10

    Default

    I am interested in knowing the same thing, so here's a *bump*

  3. #3
    Registered Member
    Join Date
    Jun 2003
    Location
    NC, USA
    Posts
    94

    Default

    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. #4
    civ
    civ is offline
    Registered Member
    Join Date
    Jan 2004
    Posts
    10

    Default

    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. #5
    Registered Member
    Join Date
    Jun 2003
    Location
    NC, USA
    Posts
    94

    Default

    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. #6
    civ
    civ is offline
    Registered Member
    Join Date
    Jan 2004
    Posts
    10

    Default

    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

Similar Threads

  1. copying an account to new server via SSH
    By alexgol in forum Data Protection
    Replies: 7
    Last Post: 07-15-2010, 11:54 PM
  2. Copying an Account from another server - failures
    By PPNSteve in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 11-11-2009, 11:17 PM
  3. Copying account to new server
    By GoWilkes in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 08-19-2008, 03:47 AM
  4. Bug when copying an account to another server
    By Ashocka in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 02-11-2006, 11:20 PM
  5. problems copying account from another server
    By randynov in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 01-15-2004, 03:14 PM
bargain