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.

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:
    72
    Likes Received:
    2
    Trophy Points:
    8
    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:
    323
    Likes Received:
    3
    Trophy Points:
    18
    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:
    72
    Likes Received:
    2
    Trophy Points:
    8
    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:
    6
    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:
    18
    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:
    134
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
Loading...

Share This Page