Undo delete | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Undo delete

UNIX for Advanced & Expert Users


Tags
linux

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-17-2005
cormacodonnell cormacodonnell is offline
Registered User
 
Join Date: Jan 2005
Last Activity: 18 January 2005, 5:56 AM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Undo delete

HI folks,


I have just deleted a folder which i need it back. I am not a big
unix user so any help is appreciated. The thing is that i had found
images in a folder:


./home/tom/.kde/share/cache/http/b/[filename_removed].jpg
as you can see these images should not really be here.
When i asked a guy in work to get details on them he deleted them


instead, crossed wires!!!! he typed ( rm -rf tom )
The thing is, the images are on a managed sever not in our premises
and the /tom folder is the name of the guy who manages it. And there
were a lot worse www's in the folder which is why i am looking for
help.


If anybody can help me to retrieve the folder it would be much
appreciated


Regards


Cormac O'Donnell

EDIT: I removed the filename as it was offensive and serves no purpose - Zazzybob

Last edited by zazzybob; 01-17-2005 at 08:00 AM..
Sponsored Links
    #2  
Old 01-17-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 13 May 2013, 9:02 AM EDT
Location: Melbourne, Australia
Posts: 2,185
Thanks: 3
Thanked 24 Times in 23 Posts
Under UNIX, if files are removed there is generally no way of undeleting them - your only choice is to restore from a backup.

Under some circumstances if the disk can be brought immediately offline after the deletion and mounted read-only, a data-recovery company/expert may be able to recover some of the data - however seeing as this is a managed server which is probably using some kind of RAID, the areas of the disk(s) that held this information before will no doubt have been written to.

Cheers
ZB
Sponsored Links
    #3  
Old 01-17-2005
98_1LE 98_1LE is offline Forum Advisor  
Registered User
 
Join Date: Dec 2000
Last Activity: 21 May 2012, 6:37 PM EDT
Location: Greater Dallas area
Posts: 405
Thanks: 0
Thanked 3 Times in 3 Posts
You might try "unrm". A friend used it years ago and said it works.

http://freshmeat.net/projects/unrm/

Or do a search on google for more hits.
    #4  
Old 01-18-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 13 May 2013, 9:02 AM EDT
Location: Melbourne, Australia
Posts: 2,185
Thanks: 3
Thanked 24 Times in 23 Posts
I think "unrm" only works on ext2 filesystems.... i know ext3 can be mounted ext2 but you cannot undelete from a jounalled ext3 filesystem - to quote from a post on the Linux kernel mailing list
Quote:
I'm afraid your out of luck. This subject was covered recently on the
linux-kernel mailing list.
The ext3 data structures do not support any method of undeleting.
Too much data is erased when a file is deleted.
I suppose it's all academic until we find out what filesystem the OP is using....

Cormac: please post the output of df -hT (I assume you're running Linux here....)

Cheers
ZB
Sponsored Links
    #5  
Old 01-18-2005
cormacodonnell cormacodonnell is offline
Registered User
 
Join Date: Jan 2005
Last Activity: 18 January 2005, 5:56 AM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
output from df -hT

Output:

Filesystem Type Size Used Avail Use% Mounted on
/dev/sda6 ext3 372M 116M 237M 33% /
/dev/sda1 ext3 45M 14M 29M 32% /boot
/dev/sda5 ext3 13G 9.4G 2.8G 77% /home
none tmpfs 251M 0 250M 0% /dev/shm
/dev/sda2 ext3 35G 7.4G 26G 22% /usr
/dev/sda7 ext3 251M 30M 208M 13% /var

take it i'm jiggered on that front since its ext3.....But....

I could be in luck as i have found a tar file named home_accounts_20040901.tar, take it at face value and say that its a backup of the home accounts . Only thing is its 3GB,gonna take 18hrs to download. was looking around on a lot of sites yeasterday to see how i could look inside the archive, i have been able to list the files in it but it just lists thousands of files. The folder i am looking for was called "tom" and was a subfolder of "home" any way of searching fof this in the archive??


Thanks for the replys


Cormac
Sponsored Links
    #6  
Old 01-18-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 13 May 2013, 9:02 AM EDT
Location: Melbourne, Australia
Posts: 2,185
Thanks: 3
Thanked 24 Times in 23 Posts
Let's say the backup is located at /backup/home_archive.tar

If you do

Code:
cd /backup
tar xvf home_archive.tar "home/tom/*"

You'll recursively restore home/tom to /backup, so the restored home directory is located at /backup/home/tom

Cheers
ZB
Sponsored Links
    #7  
Old 01-18-2005
cormacodonnell cormacodonnell is offline
Registered User
 
Join Date: Jan 2005
Last Activity: 18 January 2005, 5:56 AM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
cheers buddy
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mount /test / is it possible to undo? jui_01 AIX 5 02-22-2012 05:30 PM
Undo in unix Jairaj Shell Programming and Scripting 5 08-12-2011 12:10 AM
How do I undo a link? stoucha UNIX for Dummies Questions & Answers 7 01-02-2011 01:39 AM
Doing undo in Vi editor paragkalra Shell Programming and Scripting 2 08-08-2010 02:10 AM
undo installation on AIX 4.3 itik AIX 2 11-28-2007 03:43 AM



All times are GMT -4. The time now is 01:48 AM.