You are here: Re: data recovery **URGENT** « PHP Programming Language « IT news, forums, messages
Re: data recovery **URGENT**

Posted by BearItAll on 06/02/05 19:18

On Thu, 02 Jun 2005 16:27:42 +0200, Alfred Wallace wrote:

> I work on a debian server. with apache doocroot: /home/web.
>
> unfortunatly, the other admin creates a user with /home/web default
> directory, and then deletes the user...
>
> /home/web doesn't exists anymore.
>
> how can i recover it? please, tell me it's possible!!

I take it that you mean you do not have a backup of it.

Slim possibility that it went into the waste bin of root
(/root/.local/share/Trash', but I'm afraid that is very unlikely.

Bet we've failed so far, so to the nitty gritty of recovering files, and
the less you use your system the more chance you have of this being
successful.


Find which volume the directory was on and it's system type.

In your case that is
/dev/hd? /home
Type = ext2/3 or reoserFS
However, if your /home is not on it's own volume then you need the volume
label that is it's nearest root, such as '/'.

Now come the two answers. Beware the warnings I put with them.

Midnight commander (MC, comes with every distro) can be used to collect
deleted files from the volume you have just determined above.

The possible problem is that MC will possibly (but not always) want to be
in at node level, in which case you must umount it. Thats particularly
tricky if your /home is sharing another mount point, such as '/', which
every one would advise against of cause.


They is a Solution Two. I'm not going to properly tell you this one.
It's seriously risky and if you haven't got a backup of /home then I
assume you haven't got a backup of any of your system,.

It has been known to do more harm than good, partly because the very act
of doing this is likely to cause the deleted partitions to be written
over it it is one the same volume tree. But mainly because in going direct
to the device they is absolutely no checking, pressing return on a command
and it will do whatever that command is, good or bad, whether fully
understood by the device or not.

So enough information for you to ask a braver man than me or work it out
yourself.

You work directly on the device as if it were a file and piping
the results to another volume. The operation can be very long (in this
particular case), even if you are selective in the commend, though if
your used to regex then you can speed it up a fare bit. Otherwise expect
it to take as long as a typical format would, and it wont be until it
comes back that you know if you have done any damage.

For this you use grep and one or it's relatives. In the lines of

grep -a -d recurse -U /home/web /dev/hd??

Then pipe that to the 'cp' (not the mv command, because that causes a
write) command on a separate volume tree.

Remember that all files are treated as binary, minor fixing problems on
some document types.

I know that as commands what I've written above looks 'ok', but I was
seriously tempted to wipe it out and just leave the 'mc' part, because I
know what this one can do.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация