Metainformationen zur Seite
Dies ist eine alte Version des Dokuments!
Datenrettung
Vorgehensweise
1. Datenträger überprüfen (Stufe 1)
Tool: GSmartControl
Sollte hier ein Fehler festgestellt werden sollte unbedingt erst ein Image erstellt werden.
Danach kann die Platte mit badblocks überprüft werden.
2. Image erstellen
Tool: ddrescue (cli)
- Stufe 1:
sudo ddrescue -n -d -v /dev/sda /home/user/backup_full.img /home/user/backup_full_1.log
- Stufe 2:
sudo ddrescue -RT /dev/sda /home/user/backup_full.img /home/user/backup_full_2.log
3. Daten wiederherstellen
Nun kann mit weiteren Tools versucht werden vom Abbild vorhandene Daten wieder herzustellen.
- testdisk
- Wiederherstellung einer verlorenen und der Reparatur einer korrupten Partition
-
sudo testdisk /home/user/backup_full.img
- Schritt für Schritt Wiederherstellung (CGSecurity)
- photorec
- stell gelöschte Dateien oder verlorene Daten von einem formatierten oder defekten Dateisystem wieder her
-
sudo photorec /home/user/backup_full.img
- PhotoRec Schritt für Schritt (CGSecurity)
- Nach dem Gebrauch von PhotoRec (CGSecurity)
- scalpel
- stell gelöschte Dateien oder verlorene Daten von einem formatierten oder defekten Dateisystem wieder her. Wie photorec.
- Erst die Datei /etc/scalpel/scalpel.conf bearbeiten bzw eine erstellen
-
sudo scalpel [-c scalpel.con] [-i file] /dev/sda1 -o outputDir
- Recover Deleted Files With Scalpel
4. Datenträger überprüfen (Stufe 2)
Den Datenträger auf defekte Blöcke überprüfen
sudo badblocks -vs /dev/sdb
<note warning>Mit dem Parameter -w gehen alle auf dem Datenträger vorhandenen Daten verloren!
sudo badblocks -vws /dev/sdb
Wurde ein Abbild des Datenträgers erstellt?</note>
Paramter
- -b block-size
- Specify the size of blocks in bytes. The default is 1024.
- -i input_file
- Read a list of already existing known bad blocks.
- Badblocks will skip testing these blocks since they are known to be bad. If input_file is specified as „-“, the list will be read from the standard input. Blocks listed in this list will be omitted from the list of new bad blocks produced on the standard output or in the output file. The
-boption of dumpe2fs(8) can be used to retrieve the list of blocks currently marked bad on an existing filesystem, in a format suitable for use with this option. - -n
- Use non-destructive read-write mode.
- By default only a non-destructive read-only test is done. This option must not be combined with the
-woption, as they are mutually exclusive. - -o output_file
- Write the list of bad blocks to the specified file.
- Without this option, badblocks displays the list on its standard output.
- -s
- Show the progress of the scan by writing out rough percentage completion of the current badblocks pass over the disk.
- Note that badblocks may do multiple test passes over the disk, in particular if the
-por-woption is requested by the user. - -v
- Verbose mode.
- -w
- Use write-mode test.
- With this option, badblocks scans for bad blocks by writing some patterns (0xaa, 0x55, 0xff, 0x00) on every block of the device, reading every block and comparing the contents.
- This option may not be combined with the
-noption, as they are mutually exclusive.
5. Abbilder einhängen (mount)
Image einer Partition einbinden
sudo mount -o loop /home/user/backup_full.img /mnt/hdd_image
Partition aus einem Image der gesamten Platte einbinden
- offset der Partition ermitteln
-
sudo fdisk -l /home/user/backup_full.img
- Der hierdurch ermittelte Anfangswert der Partition muss nun mit der Sektorgröße multipliziert werden
- Partition einbinden
sudo mount -o loop,offset=<wert> /home/user/backup_full.img /mnt/hdd_image
Diskussion