Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

which system should have possibility of undeleting ?

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
cc
Posts: 820
Joined: 2005-06-08 19:14

which system should have possibility of undeleting ?

#1 Post by cc »

hi

I have Debian Sarge installed on ext3

by mistake I've deleted some important TEXT files

how I know ext3 data structures do not support any method of undeleting

I've heard there is only a one possibility using grep, but knows someone how it works ?

which system should have possibility of undeleting ?

I'd like to setup a new Debian Server using a system with the possibility of undeleting.

greetings
cc

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#2 Post by lacek »

Undeleting on ext3 is not straightforward, the most you can do is to check the blocks and see if they contain anything useful. This means checking the physical device for pieces of data you know to be in your deleted file, and hope for the best. I'd say the undeleting on ext3 is destined to be futile.
Ext2 can be undeleted, however, so if you use only ext2 FS, there are a bunch of tools you can use for undeleting.
And no, you can't mount an ext3 FS as ext2 to use these tools.

User avatar
mority
Posts: 75
Joined: 2005-07-28 07:47

#3 Post by mority »

I think none of the modern journalling file systems support any undelete mechanisms.

You could write a shell script which moves files to a directory called ~/.trash or something. Then, using this script instead of "rm" to "delete" a file, this technique would result in a similar behaviour as the trash bin in desktop systems like Gnome or KDE.

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#4 Post by lacek »

mority, the script you described would really make sense, however, it isn't protecting you from other means of deleting files, like from mc. When I go cleaning up some mess on the HD, I usually use mc to do so, because this way I can see the files and directories what I want to delete. Should I accidentally delete something important, the script won't help me.

I think that the effort would be put into preventing important files from deleting, like setting the immutable attribute on them. This way, any change, including deletion would require you to clear the attribute first. Of course, if you need to change the file contents often, this could be irritating....

User avatar
mority
Posts: 75
Joined: 2005-07-28 07:47

#5 Post by mority »

Right. And after all you should make regular backups of important files :)

Post Reply