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.

How to copy account on SAME server

Discussion in 'General Discussion' started by TheKog, Oct 6, 2008.

  1. TheKog

    TheKog Active Member

    Joined:
    Dec 23, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    I am looking for an easy way to copy an account on the same server into another account that will be a different username, and domain on the same server. I need to do this for development purposes so I can have a clone of an account/site for development purposes.

    Backing up an account with the pkgacct is simple. But is there a way to make it restore into an account of my choosing using the restorepkg script?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    When you restore a packaged account, cPanel/WHM will automatically attempt to set this up on the same username and domain it had when it was packaged.

    However, if an account already exists at that username/domain, you can simply modify that account (the live account, not inside the package) and change the username and domain (if it is not a reseller account). Restoring the packaged account will result in a second copy of the account, residing at the original username and domain.

    To recap:
    1. You start with example.net
    2. Package example.net
    3. Modify the account example.net to now be example.com
    4. Restore the packaged account
    5. example.net has been restored, example.com also exists on the server.
     
  3. TheKog

    TheKog Active Member

    Joined:
    Dec 23, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Thanks David - that's what I thought since the pkgacct files have the account name throughout them.

    The problem with this (and correct me if I'm wrong), is that there will be downtime on the site being copied (example.net will be unavailable until the restore won't it?)

    Also when you say change example.net to example.com are we talking changing the account name AND account domain via the Modify Account menu in WHM?
     
  4. TheKog

    TheKog Active Member

    Joined:
    Dec 23, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Thanks David - I tried it and it works as advertised but the downtime is an issue. Any ideas on how to do this without the down time?
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That is correct.

    This is also correct. Two accounts cannot have the same username and two accounts cannot host the same domain on the server. Note, the account domain can also be a subdomain. So if you don't have a spare domain, you could make this something like testing.example.net instead of example.com.
     
Loading...

Share This Page