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.

Manual Restore of a Cpanel Server Hard Disk

Discussion in 'General Discussion' started by ho247, Mar 19, 2003.

  1. ho247

    ho247 Active Member

    Joined:
    Mar 25, 2002
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    United kingdom
    I need to restore a server with Cpanel on it. All the files are available on a slave drive. The list of files I've got to do a manual restore or copy of an old Cpanel server is as follows:

    Does anyone have an updated versino of this list with the many features that have been added to Cpanel? I want to be able to copy all the files from the old hard disk to the new hard disk replacing all the files required. So the IP address will remain the same.

    Thanks,
    Alan
     
  2. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    hi

    Hi Alan, did you get any answer to this question ? we are in the same situation.

    Thanks in advance
     
  3. ho247

    ho247 Active Member

    Joined:
    Mar 25, 2002
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    United kingdom
    The list above is the list of files and folders I used, which works fine. I've done a manual restore a few times and every time it works. Just reboot the server when you've copied all the files back.

    Alan
     
  4. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    Thankx Alan, we will try it.

    See ya
     
  5. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    We will be restoring one of our servers from a slave drive in the next few days. Does anyone know if this has changed with CPanel 7.2x?

    cPanel.net Support Ticket Number:
     
  6. ho247

    ho247 Active Member

    Joined:
    Mar 25, 2002
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    United kingdom
    As far as I know, the file structure that Cpanel uses never changes, all their custom software files are stored in /usr/local/cpanel that's why you just copy the whole directory over. You should be fine using the file list above. Don't hold me responsible though :).

    cPanel.net Support Ticket Number:
     
  7. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    A few problems I'm running into now that I've restored from the slave drive:

    1. php include(); and require(); seem to fail ... have rebuilt apache and php with no luck.
    2. apache won't restart if you use the link in WHM or from any script that tries to restart it (i.e. at the end of easyapache), but it restarts fine if you use "service httpd restart" in SSH.

    Any ideas?

    cPanel.net Support Ticket Number:
     
  8. ho247

    ho247 Active Member

    Joined:
    Mar 25, 2002
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    United kingdom
    For the first problem, check your php.ini file and see what paths users are allowed to include from, you might need to add "./" to the list. We had this problem a while back, but not sure if it's the same solution.

    The httpd restart problem I'm not too sure about without checking out the server myself and seeing any specific errors that come out. Give the server a good reboot to make sure all the services start up from scratch.

    cPanel.net Support Ticket Number:
     
  9. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    '

    Fixed #1 with /scripts/killmoddav

    Fixed #2 by re-copying the SSL directory (don't know why that didn't copy the first time anyway ;) )

    cPanel.net Support Ticket Number:
     
  10. incastle

    incastle Registered

    Joined:
    Jun 10, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I use this list
    but
    /var/cpanel (dir)

    I get error message cp omitting directory

    how do I fix that
     
  11. bonnmac

    bonnmac Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Perfect except now, none of my users can access their cpanel/whm their passwords are rejected. Even after I reset them in whm & ssh they are still rejected. Any ideas what's missing?

    Oh, and sub-domains don't work. You can access them via http://domain.com/sub-directory/ but not http://sub.domain.com

    Any ideas?
     
    #11 bonnmac, Dec 28, 2003
    Last edited: Dec 28, 2003
  12. jphilipson

    jphilipson Well-Known Member

    Joined:
    Jan 8, 2003
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Hey bonny, remember me lol? Catch me on msn sometime... (spongebob) ... but to answer your question, sounds liek the etc/passwd did not get mirrored off the old drive..

    if you can't get it to work, you know where to find me, I have restored a few cpanel machines lately...
     
  13. bonnmac

    bonnmac Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Hey there! How could I forget you. :) I'm not on msn much anymore, but I'd love to chat with you. I'll pop on so we can catch up on life etc.

    /etc/passwd was copied, but I think I found something that should be on the list. /etc/shadow that seems like it may have fixed the issue, but I'm not completely sure yet.

     
  14. jphilipson

    jphilipson Well-Known Member

    Joined:
    Jan 8, 2003
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    yeah, you need the shadow file.. that will fix your issue.. just check the cpanel restore how-to I posted on ev1/rackshacks forums .. http://forum.ev1servers.net/showthread.php?s=&threadid=38797

    that lists all the files you need to restore from an old drive after a crash, once the old disk is mounted you can have your customers back up in an hour...
     
  15. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    the moving of the /var/mysql folder somehow removed the mysql.sock file!

    how do i go about recreating the mysql.sock file?

    Also copying /var/cpanel over, i check List Accounts and it has nothing in it.
     
  16. ho247

    ho247 Active Member

    Joined:
    Mar 25, 2002
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    United kingdom
    I think you mean /var/lib/mysql folder. To get mysql.sock back, simple do a "service mysql restart" which will restart mysql and the mysql.sock file should appear again.

    To get the accounts to show up after a manual restore, you can try running "/scripts/upcp" from SSH.

    Both commands need to be run without the quote marks.
     
  17. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    upcp doesnt do much to restore the accs.

    /var/lib/mysql/mysql.sock isnt there. it somehow got wiped during the copy process.

    i cant access mysql now
     
  18. trusted-host

    trusted-host Member

    Joined:
    Jul 3, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    is SFTP Same As SSh?
     
  19. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    you must have SSH activated to use SFTP, and of course an ftp client that support sftp.
     
  20. trusted-host

    trusted-host Member

    Joined:
    Jul 3, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    im using dreamweaver is that good?
     
Loading...

Share This Page