From: Emmanuel Florac <eflorac@intellique.com>
To: "Alberto (albertix.com)" <alberto@albertix.com>
Cc: xfs@oss.sgi.com
Subject: Re: Recover fs
Date: Wed, 10 Oct 2007 19:40:13 +0200 [thread overview]
Message-ID: <20071010194013.32accad1@galadriel.home> (raw)
In-Reply-To: <470B4D3A.3060105@albertix.com>
Le Tue, 09 Oct 2007 11:43:22 +0200 vous écriviez:
> I'm desperade (aprox. crying) , on this disks was 3 years of work
> data (web, db, materials).
> It's possibility to recover this data (nothing else was writing
> after on disk disks) ??? . Pls help me
> If is possibilty, I promise to make 10 copies (for penitency).
Alberto, apparently nobody cares to reply because 1) there's
essentially nothing to do and 2) you deserved it. I'm sorry, but you
really deserved it. Not backing up important data is plain stupid, but
not backing up important data when moving it around is completely crazy.
Now there is only one thing you may still try, but you won't get back
everything, and it will be very long and very painful : scan the hard
drive one byte at a time, and look for something you know. If you're
looking for JPG files, look for JPG headers, or HTML headers, for
databases there's probably some sort of identifiable header too.
I did it one for a 12 TB X>FS that went booom (2.6.17 bug) containing
only DV files. Here is the perl program I used.
#!/usr/bin/perl
use strict;
use warnings;
my ( $file ) = @ARGV;
my $blocksize = 144000 ;
my $lookupstring = pack "H*", "1F0700" ;
my $regexp = qr/^(.*?)($lookupstring.*)$/s ;
open ( my $raid, "< $file" ) or die "impossible d'ouvrir $file \n" ;
{
my $block ;
my $offset = 0 ;
my $nextblock = 0;
my $testfile;
my $outnumber = 0;
seek $raid, $offset, 0 or die ;
while ( my $readbytes = read $raid, $block, $blocksize ) {
$offset += $readbytes ;
if ( $block =~ m/$regexp/ ) {
print "trouvé, fichier $outnumber offset
$offset\n";
if ( $testfile ) {
print $testfile $1;
close $testfile or die "Peut pas
fermer, $! "; undef $testfile ;
$outnumber++;
open $testfile,
">/mnt/destination/out". sprintf ("%09d", $ outnumber) . ".dv" or die
"impossible d'écrire sur fichier $outnumber "; print $testfile $2 ;
} else {
print "OPEN\n";
open $testfile,
">/mnt/destination/out". sprintf ("%09d", $ outnumber) . ".dv" or die
"impossible d'écrire sur fichier $outnumber "; print $testfile $2 ;
}
} else {
if ( $testfile ) {
print $testfile $block;
}
}
if ($offset > 14293651161088 ) {
print "fini....\n";
exit;
}
}
}
--
--------------------------------------------------
Emmanuel Florac www.intellique.com
--------------------------------------------------
prev parent reply other threads:[~2007-10-10 18:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 9:43 Recover fs Alberto (albertix.com)
2007-10-10 17:40 ` Emmanuel Florac [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071010194013.32accad1@galadriel.home \
--to=eflorac@intellique.com \
--cc=alberto@albertix.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox