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!

Script deletes files in /root - server health?

Discussion in 'General Discussion' started by ebizindia, Feb 16, 2009.

  1. ebizindia

    ebizindia Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    90
    Likes Received:
    3
    Trophy Points:
    158
    Location:
    Kolkata, India
    cPanel Access Level:
    Root Administrator
    Hi

    While testing a script I had written, I deleted the files in /root by this command:

    rm -rf *

    Now the server is running but I am told that some critical files have been lost and the server won't be able to come back if it ever had to be rebooted. Is this correct?

    Is there a way to recover from this situation without requiring an OS reload?

    Can a server software update through WHM recreate/recopy these files?

    Thanks for your kind help!
    Arun
     
  2. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    First thing that comes to mind is to check with your data center to see if they have a backup. If so, have them restore it.

    Ron
     
  3. ebizindia

    ebizindia Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    90
    Likes Received:
    3
    Trophy Points:
    158
    Location:
    Kolkata, India
    cPanel Access Level:
    Root Administrator
    No backup of system files

    My data centre wants to backup something at $135/hour and then suggests that I have to reconfigure everything after they have reloaded the OS.

    If they cannot backup things, why charge?

    I do have access to the root of a friend's CPANEL server. Will it help in any way?
     
  4. britsenigma

    britsenigma Well-Known Member

    Joined:
    Dec 14, 2008
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    56
    If you had identical servers, both hardware and software including configuration you could try rsyncing the missing files.

    It depends on your partitioning also.
     
  5. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    168
    Best bet: bite the bullet. Backup what you can and have them reload the OS.

    That's a painful mistake :(
     
  6. SB-Nick

    SB-Nick Well-Known Member

    Joined:
    Aug 26, 2008
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Hello,

    Having your /root folder/partition erased will NOT prevent from having your server rebooted without loosing connection.

    Just recreate the folder if it does not have its own partition and restore the common /root files such as .bashrc .bash_profile and you will be fine.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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