Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Nov 2011
    Posts
    7
    cPanel/Enkompass Access Level

    Website Owner

    Default Making a 'dev copy' of cPanel server?

    Did search first, but didn't find anything matching our situation.

    What we are trying to accomplish is create an internally managed development server that mirrors our 3rd party hosted web server, which uses cPanel. Previously, most of the content/work on the site was done by a consulting firm, but we are gearing up to do some of this work internally, with an eventual goal of doing most/all ourselves. We have (I believe) full access to the cPanel of this server, and have managed pretty much everything accessible in cPanel ourselves for quite some time (generally by enlisting support when it is something we haven't needed to do/learn previously).

    I'm a server/network guy, don't really have the web developer experience/skillset, just happen to be the one asked to build up the dev environment. Thus far I have built a server with a public address (and the DMZ to allow that), and installed CentOS/cPanel on it. It is to the point where it is prompting for activation, but I thought it might be good to have an idea if I'm on the right track before getting my 15 day trial license (time flies when you are learning as you go). For the basic setup steps I duplicated the choices present on our production (hosted) server, in hopes of providing the most consistent sandbox for those who will be using it.

    What is the best way to duplicate our existing web site onto the new server? Is it a manual process, or can it be automated/scheduled?

    Does the fqdn the box is using need to be added to the authoritive name servers for name resolution (since we don't plan to actually expose it to the outside)?

    I am pretty confident I'm in "don't know what I don't know" territory here. Am I approaching this with some obviously incorrect or incomplete assumptions?

    Any insight or assistance would be greatly appreciated. (Including, "get the trial license and have support help you," if that is the best course of action.) Thanks!

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Making a 'dev copy' of cPanel server?

    Since this is going to be a development server, the best way to mirror would be to use rsync in that situation. I want to note that only a test server that is not production would be best suited for rsync over using the regular backups and transfer tools cPanel/WHM provides.

    If you want to use rsync, here is a guide on how to do so:

    http://forums.cpanel.net/f5/rsync-ba...tml#post671150
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Member
    Join Date
    Nov 2011
    Posts
    7
    cPanel/Enkompass Access Level

    Website Owner

    Default Re: Making a 'dev copy' of cPanel server?

    Due to no response as of this morning, I had proceeded to get a trial license and have been setting up the new server exactly like the production server. (Just working my way down the list in the leftmost pane, and have gotten down to Transfers section.) Feel like I have it configured identically (thus far), except of course things directly related to the Accounts. Was looking at using the "Copy an account from another server" transfer to copy over one account to test the process, and popped back in to check the forum for tips on doing that.

    For the initial setup, at least, is that method better/worse than rsync? (The "Copy an account from another server" looks much simpler than rsync, in reading through the thread you had linked me to. I do have full root access to both cPanel servers, btw.)

    Ahh, and I did want to nail down the copying of an account does not change the existing account on our production server before doing anything there. (Sounds like the case from posts 9 and 10 of http://forums.cpanel.net/f5/use-back...nt-232052.html )

    Thank you!

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Making a 'dev copy' of cPanel server?

    Copying an account to transfer it will end up taking far longer than doing an rsync, since you can simply cron periodically rsyncing the accounts, files and folders. Rsync allows you to only grab changed files since the last rsync.

    Since this is a development machine, rsync is a better method to use. You do not, though, want to change the IP files mentioned in the thread (since you want each machine to maintain its own separate IP).

    I wouldn't base the choice made on what appears easier but on what will work better for the specific scenario. In the long-run, rsync via a cron is actually easier to perform.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  5. #5
    Member
    Join Date
    Nov 2011
    Posts
    7
    cPanel/Enkompass Access Level

    Website Owner

    Default Re: Making a 'dev copy' of cPanel server?

    Okay, I have confirmed rsync is already installed on the server. I have physical cli, ssh, and cPanel web console access to the new/local/"dev" server, and then ssh and cPanel web console access to the old/remote hosted/production server.

    Do I need to do anything in the way of setting up the accounts or file structures in preparation, or will rsync do all that as part of the copy process?

    It looks as though (after quite a bit of reading) this is the correct syntax to enter at the local server to copy (via ssh) the account *Account-Name* from the webroot of the Production Server *Production-Server.url* to the webroot of the local server:

    rsync -r -a -v -e "ssh -l *Account-Name*" --delete *Production-Server.url*:/webroot /local/webroot

    Unless I have that totally reversed, in which case the whole "--delete" makes me pretty nervous. (Can I run this without the --delete switch? I'd like that much better, if so.)

    Just carefully feeling my way along. I really appreciate the help. Thank you!

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Making a 'dev copy' of cPanel server?

    Why are you adding the delete command to the rsync? I'm just confused why you wouldn't simply follow the exact instructions of what to copy into /tmp/movelist file onto the development server and use the same rsync command provided in that guide.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  7. #7
    Member
    Join Date
    Nov 2011
    Posts
    7
    cPanel/Enkompass Access Level

    Website Owner

    Default Re: Making a 'dev copy' of cPanel server?

    I was working off the "How to use rsync for transferring files under Linux or UNIX" you'd linked to in post 30 of the rsync thread you linked to above (http://forums.cpanel.net/f5/rsync-ba...tml#post671150). But perhaps I was confusing two different things?

    I guess I wasn't sure how to go about populating the "movelist" file with the correct information, and the other was something I could wrap my head around (or so I thought). I really am new to this (hence posting this in the "New User Questions" subforum), sorry if I'm just slow on the uptake.

    Can you give me some insight on what to put in the makelist file? Do I need to get a directory listing from the old server and paste it into the file, or am I just drifting farther into the weeds?

    Thank you!

  8. #8
    Member
    Join Date
    Nov 2011
    Posts
    7
    cPanel/Enkompass Access Level

    Website Owner

    Default Re: Making a 'dev copy' of cPanel server?

    I submitted a post earlier, but it was apparently held for Moderator approval for some reason. Hoping it went/goes through.

  9. #9
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Making a 'dev copy' of cPanel server?

    You'd simply need to copy the exact contents already in the movelist file in that post, since that will copy the main components that you need to copy over. You'd follow the guide exactly other than the IP portion mentioned, since you wouldn't want to include changing the IP parts.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  10. #10
    Member
    Join Date
    Nov 2011
    Posts
    7
    cPanel/Enkompass Access Level

    Website Owner

    Default Re: Making a 'dev copy' of cPanel server?

    Okay, I was able to make the movelist file, and put the list of directories in it that you specified.

    One curious thing is that I am getting repeatedly prompted for the root password, unsure if that is to be expected, and when I type it in I typically get either rsync errors, or this:

    stdin: is not a tty
    receiving incremental file list


    sent xx bytes received xxx bytes x.xx bytes/sec
    total size is xx speedup is x.xx

    Rsync errors look like this:
    Making a 'dev copy' of cPanel server?-rsync-errors.gif

    Not sure if this is normal, and I just need to let it finish and then run it again to catch what failed the first time, or if this is an issue. Just going to keep providing the password and let it run, until I hear differently.

    Thank you!

  11. #11
    Member
    Join Date
    Nov 2011
    Posts
    7
    cPanel/Enkompass Access Level

    Website Owner

    Default Re: Making a 'dev copy' of cPanel server?

    Looks like everything is good, after the rsync finished. I did have to fix the license, and the passwords were changed to match those on the production server, but the accounts/domains are showing up in the list in cPanel.

    Looks like I just need to set up the web sites as subdomains of the dev server's hostname main domain, to be able to access them at different dns names than the production sites live at.

    Thanks again for all your help!
    Last edited by SBinIN; 11-08-2011 at 02:09 PM.

Similar Threads & Tags
Similar threads

  1. cpanel copy an account from another server doesn't copy full dns zone
    By boatdesign in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-17-2007, 01:26 PM
  2. Replies: 7
    Last Post: 06-03-2007, 09:07 PM
  3. Making Complete Copy of Mailman List
    By Lamar in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-31-2004, 03:24 AM
  4. HowTo: Copy cPanel Packages from Server to Server
    By comcage in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 04-10-2004, 02:42 PM
  5. Making Copy an account from another server with account pass
    By Myacen in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-10-2002, 05:04 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube