Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Ensim -> cPanel (no go), Need help disecting copy script Urgently Please!

Discussion in 'General Discussion' started by Mindlash, Sep 16, 2003.

  1. Mindlash

    Mindlash Well-Known Member

    Jul 7, 2003
    Likes Received:
    Trophy Points:
    I've found myself experiancing problems from the very begining while trying to transfer accounts from Ensim to cPanel using the built in WHM script(s).

    Initially, the script times out upon copying the 'copy script' over to the server (according to /var/log/messages/ the ssh session times out... odd) Either way, I'm needed to get these sites moved, and quickly.

    Looking at the /script/pkgacct that is created on the Ensim server, I've found that it can be given a username (the master account name created with the domain, such as 'example')... in which case the following would be issues from the /scripts/ directory on the Ensim server:

    perl pkgacct example

    This begins the copying and placing of files in the /home/cpmove-example directory then tar/gz's the file to /home/cpmove-example.tar.gz and says the script is done.

    Wee... I'm ahead of myself at this point.

    Once I realized I wouldn't know what to do after going through manually on all 50+ sites, I figured I would stop here and see what I could do on importing this new tarball.

    FTP'ed one test file from Ensim to cPanel server, and copied file to /home/cpbackup/migrating

    Logged into WHM, (i've already set the backup option to Restore Only). I clicked on the option "Restore Backups". Gave me the option to restore the one domain.tar.gz file I copied over with 'create account'...

    I though I was there, unfortunatly, I got the following error in WHM:

    Extracting tarball...................
    Extracting Domain....Done
    Sorry, the copy failed. Unable to find the cpanel user file
    Account Restore Failed...

    I then realized, this isn't a backup, but something quite different... a transfer.

    This is where hopefully someone here can come in and help me. I need to know what files on the cPanel server are used during the 'transfer' options. So, that I may configure a script to 'bypass' the server-to-server part, and jump directly to the unzipping/creating part (as I'll manually copy over the tar.gz files to the /backup/cpbackup directly myself (or wherever they need to be).

    If anyone can give me insight into what file(s) need to be modified, or reviewed to give me a glimps into this I would be VERY greatful.

    Thank you in advance, and remember... I"m slightly under the gun on this.

    .:. Mindlash Support Ticket Number: Urgent Help Requested Support Ticket Number:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. tAzMaNiAc

    tAzMaNiAc Well-Known Member

    Feb 16, 2003
    Likes Received:
    Trophy Points:
    Sachse, TX
    One advice.. use the support ticket. I'm sure cpanel will be more than happy to help you - fast now that they don't have many issues at the moment. Support Ticket Number:
  3. Mindlash

    Mindlash Well-Known Member

    Jul 7, 2003
    Likes Received:
    Trophy Points:
    I would have agreed thursday of last week, however I placed the ticket Friday mid-day.

    It wasn't until Monday that I replied to their auto-response asking if they needed any more information, that I got an email saying that something like that would have to wait on a developer, and they would get back with me as soon as possible.... later Monday, a developer emailed me asking for some info. Haven't heard back yet.

    I'm in such a rush that I couldn't wait on this to be done. I've moved forward gathering bits and peices from forums here... to basicly do a sudo-manual transfer.

    To answer my questions about files... I've found that you're not going to find the /scripts2/ directory, as it just doesn't exist. It's a hard-coded path, to a compiled folder (of which you can't decompile).

    By copying over the appropriate /scripts/pkgacct file to my Ensim server in /scripts/ I could then initiate the 'packaging' (or backing up) of the Ensim accounts with:
    perl /scripts/pkgacct domainowner

    Note: domainowner is the initial account that was set up within Ensim... if you have multiple names that are the same, you'll need to go into Ensim first and change the account (if nothing else, just temporarily while the script runs).

    Note: the script does backup httpd log files, so if you have large active sites, it's a good idea to remove the access_log.1 .2 .3 and error_log.1 .2 .3 etc...)

    You can write a quick script to do these for you (I found a script at RS and bastardized it my needs) -- I found by searching the key-words "finding large files" at RackShack.

    Then run the /scripts/pkgacct domainowner

    You'll have to do this for every domain (or if you know how, create a script to go through and while-loop till finished (best bet)).

    Once done, you'll need to FTP the files to you cPanel server. I prefer to use ncftp from Ensim. You'll want to move them to your /home/ directory (they'll be named cpmove-domain.tar.gz)

    Once you've got them there, you can use the following script to 'back them up' to the server:

    /scripts/restorepkg domainname_without.TLD
    (example: restoring --
    /scripts/restorepkg example

    That will run the search for /home/cpmove-example.tar.gz and begin the 'backup' process. It will create the account, add to DNS, create Emails, create MySQL (95% ot the time)... it will not properly create the user/pass within MySQL and associate it with your DB (fun).

    Naming conventions for MySQL change, and I ended up getting double databases (domain_domain_com and domain_domain) with same tables and what-not.

    I'm in the process now of going through all the sites, one at a time replacing the default /home/virtual/site#/fst/var/www/html paths

    I am using a simplified 'replace' as shown below:

    replace '/home/virtual/' /home/domain/www/ -- /home/domain/www/*.php

    You'll obviously need to change as needed for your needs... and one 'site' at a time. :-/

    Oh, and it doesn't do anything about resellers for you...

    It's a ROYAL pain, but seeing as I need to this done yesterday, this was a blessing that I found all this information.

    Hopefully this can help others.

    .:. Mindlash Support Ticket Number:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice