LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-08-2011, 07:50 AM   #1
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Rep: Reputation: 18
I accidently delete my /var server box on CentOS how can I recover it?


hello
I accidently deleted /var of my server box on CentOS how can I recover it?

Thanks
 
Old 05-08-2011, 07:51 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Restore it from your backup
 
1 members found this post helpful.
Old 05-08-2011, 08:41 AM   #3
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
I hope you have a backup. If not, consider using backuppc.
It will automatically back up your computers daily without
you giving it a thought.

Just the fact you're asking what to do makes me think you
don't have a backup. If that's the case, there are two
paths you could take.

The first is a little risky in that you might not recover
some things like scheduled cronjobs. What you could do is
copy the /var directory from another computer of the same
distribution and version.

The second is more work, but a better method. Back up
everything you want to keep from your current system,
reinstall the os, then copy the files you wanted to keep.
 
Old 05-08-2011, 02:33 PM   #4
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Original Poster
Rep: Reputation: 18
You think I did not know these things: backup or OS reinstall I have to say thank you very much but I think it is clear in my question that my system is a server and has important files like mysql data base in /var or more thing I want to recover them back how can I do this for example in windows there is some utilities that undelete or recover deleted files or even formated partitions it has to be same thing in linux . Linux is a powerful OS it has to have some thing for it .
It was just a common mistake in a wrong place "I mean using "rm -rf" and using absolute path "/var" instead of relational path "var" in a sub directory" so what can I do now?
 
0 members found this post helpful.
Old 05-08-2011, 02:40 PM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look at
https://encrypted.google.com/search?...ient=firefox-a
Quote:
You think I did not know these things: backup or OS reinstall I have to say thank you very much but I think it is clear in my question that my system is a server and has important files like mysql data base in /var or more thing I want to recover them back
If this is a server you should have backups.

Kind regards
 
1 members found this post helpful.
Old 05-08-2011, 02:50 PM   #6
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Original Poster
Rep: Reputation: 18
I did that search before but thank you again.
I just wanted some tool names that is easy to work and best in recovery that makes me sure to do that I do not want to lose my data because it is my first time that I want to recover my important data I wanted to use your experiences not teaching me how to use google.
 
0 members found this post helpful.
Old 05-08-2011, 03:13 PM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by golden_boy615 View Post
I did that search before but thank you again.
I just wanted some tool names that is easy to work and best in recovery that makes me sure to do that I do not want to lose my data because it is my first time that I want to recover my important data I wanted to use your experiences not teaching me how to use google.
Well, if you know how to use Google, then how about reading what Google tells you?? The first three links on that search give you commands and methods of data recovery. This has also been covered on this site many, MANY times, which you could find with a quick search. For example:
http://www.linuxquestions.org/questi...-linux-878507/
http://www.linuxquestions.org/questi...8/#post2213747

If you want your data back, your best hope is to turn the system OFF, as quickly as possible. From there, you MAY have a chance, but there is NOTHING DEFINITE. RIPLinux and photorec MAY be of help. As you've been told, the only reliable method is to restore from backups. If you don't have one, and you've been using the system after the delete...then you probably don't have a chance at all. Reload the OS, and begin again.

Last edited by TB0ne; 05-08-2011 at 03:18 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accidently reset SELINUX context for /var folder permissions....HELP!?!?!? alannerd Linux - Newbie 3 01-30-2011 04:18 PM
HELP! How to recover /etc/inittab? Accidently renamed it. Arodef Linux - General 3 11-20-2007 03:21 PM
Help Accidently deletd /var/* varun2784 Linux - Newbie 3 11-03-2005 05:52 PM
Help Accidently deletd /var/* varun2784 Linux - General 1 11-03-2005 05:51 PM
accidently deleted /var/log/packages lennard Slackware 8 06-21-2004 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration