Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Apr 2005
    Posts
    34

    Default Best way to replicate an account?

    I want to replicate an account on the server so I can do some testing. Here are some of the details:

    - To avoid potential problems with testing in a different environment, I want the duplicate account to be on the same server, but obviously it will have to have a different username.

    - The account has a massive number of files in it, some are owned by user and therefore the ownership would have to be changed to the new username, however, many of the files are owned by "nobody" because they've been uploaded using PHP scripts so I can't just chown -R the entire account

    - I will also need to replicate the databases.

    I know there are back-up/restore functions in both WHM and cPanel, but I'm not sure if any of them will do what I'm trying to do here.

    Thanks for your help,
    Paul

  2. #2
    Member
    Join Date
    Jul 2005
    Location
    Sticky On Internet
    Posts
    555

    Lightbulb try this at ur own risk.

    hi,
    give this method a try on your own risk, it might create problems so backup everything before you try it.

    as you want to have a same account replicated to another so you can test the modifications done, you should try to first backup the account in question from ssh.

    /scripts/pkgacct username

    then goto root whm--> Modify and account and change the domain name and username choose a different name for both fields.

    again from ssh

    /scripts/unpkgacct username
    where username would be the original one.

    now you have the main account restored from the Backup and a copy of it which is infact the renamed account.

    It may cause problem if not done properly so DO VERIFY your backup before you do the play.

    see ya,
    mohit
    Learn atleast A word Daily

    7+1 Dedicated Boxes with cPanel...

  3. #3
    Member
    Join Date
    Apr 2005
    Posts
    34

    Default

    mohit, thanks for your reply. If I understand what you're suggesting, I would be essentially renaming the existing account to the new account and then restoring the account from back-up. That would mean there would be a period during the restoration of the account from back-up when the account would be down. We have thousands of clients accessing this accoutn and we can't afford downtime like that, so I'm afraid that is not a viable solution.

    Is there some way to back-up the account and then restore it in the new account?

  4. #4
    Member
    Join Date
    Oct 2006
    Posts
    312

    Default

    With the method suggested, I dont see any reason why it should go down for more than a few minutes since the site wont go down until you start renaming and restoring it.

    Another option would be to copy whatever user files to say /backup, create a new account and then MANUALLY copy the contents to the NEWLY CREATED ACCOUNT, not forgetting to MANUALLY CHOWNing the respective files to the new USER.

    You sure you want to do this?
    .
    RTG (Asia) Network
    Unmetered ®cPanel VPS from $28.00
    Shared & Reseller Accounts from $2.00
    Unmetered Dedicated Servers from $58.00
    Your account will be setup AUTOMAGICALLY upon payment.

  5. #5
    Member
    Join Date
    Apr 2005
    Posts
    34

    Default

    Quote Originally Posted by brendanrtg View Post
    With the method suggested, I dont see any reason why it should go down for more than a few minutes since the site wont go down until you start renaming and restoring it.
    Well, there are like 5 GB of files in the account. I don't know how long that would take to extract from back-up, Plus mohit's "do at your own risk" comment, makes me wary. If there's a problem, then the downtime would be longer.

    Another option would be to copy whatever user files to say /backup, create a new account and then MANUALLY copy the contents to the NEWLY CREATED ACCOUNT, not forgetting to MANUALLY CHOWNing the respective files to the new USER.

    You sure you want to do this?
    Not really. That's why I'm here asking for alternatives.

  6. #6
    Member
    Join Date
    Oct 2006
    Posts
    312

    Default

    Regarding:

    #1 We have tried that many a times and have not had any problems with the method suggested. I believe he/she was issuing a STANDARD DISCLAIMER just in case? lol

    The site we tested on was about 3gb in size and took us less than 30 minutes, not on a P2, of course.

    #2 I really dont see any other alternatives other than the 2 listed here.

    .
    RTG (Asia) Network
    Unmetered ®cPanel VPS from $28.00
    Shared & Reseller Accounts from $2.00
    Unmetered Dedicated Servers from $58.00
    Your account will be setup AUTOMAGICALLY upon payment.

Similar Threads & Tags
Similar threads

  1. Filed with Developers Search for Suspend / Unsuspend an Account function in WHM [Case 57215]
    By DjiXas in forum Feature Requests for cPanel/WHM
    Replies: 8
    Last Post: 02-22-2012, 09:10 AM
  2. Account Creation Limits refers to WHM account or cPanel account?
    By alphareseller in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-01-2011, 07:02 PM
  3. Replies: 1
    Last Post: 05-23-2009, 03:17 PM
  4. cpanel account file not created, account invisible in WHM
    By Cristi4n in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 01-04-2007, 09:13 PM
  5. Transfer Error (WHM) Copy an account from another server with account password
    By minasonline in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 06-22-2003, 09:08 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube