Difference between pages "Opera" and "Ddrescue"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
(External Links)
 
m (website)
 
Line 1: Line 1:
{{expand}}
+
{{Infobox_Software |
 +
  name = ddrescure |
 +
  maintainer = [[Antonio Diaz Diaz]]|
 +
  os = {{Linux}}|
 +
  genre = {{Disk imaging}} |
 +
  license = {{GPL}} |
 +
  website = [http://www.gnu.org/software/ddrescue/ddrescue.html http://www.gnu.org/software/ddrescue/ddrescue.html] |
 +
}}
  
== Data directory ==
+
'''ddrescue''' is a raw disk imaging tool that "copies data from one file or block device to another, trying hard to rescue data in case of read errors."  The application is developed as part of the GNU project and has written with UNIX/Linux in mind.
Opera stores the user data in the following locations:
+
  
On Linux:
+
'''ddrescue''' and '''[[dd_rescue]]''' are completely different programs which share no development between them.  The two projects are not related in any way except that they both attempt to enhance the standard [[dd]] tool and coincidentally chose similar names for their new programs.
<pre>
+
/home/$USER/.opera/
+
</pre>
+
  
=== Typed history ===
+
From the [[ddrescue]] info pages:
The file '''typed_history.xml''' contains the history of the URLs typed in the address bar by the user.
+
<blockquote>
 +
GNU ddrescue is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors.<br><br>
  
=== Search field history ===
+
Ddrescue does not truncate the output file if not asked to. So, every time you run it on the same output file, it tries to fill in the gaps.<br><br>
  
The file '''search_field_history.dat''' is an XML file that contains the history of queries typed in the search bar by the user.
+
The basic operation of ddrescue is fully automatic. That is, you don't have to wait for an error, stop the program, read the log, run it in reverse mode, etc.<br><br>
  
=== Global history ===
+
If you use the logfile feature of ddrescue, the data is rescued very efficiently (only the needed blocks are read). Also you can interrupt the rescue at any time and resume it later at the same point.<br><br>
The file '''global_history.dat''' is a text file.
+
  
<pre>
+
Automatic merging of backups: If you have two or more damaged copies of a file, cdrom, etc, and run ddrescue on all of them, one at a time, with the same output file, you will probably obtain a complete and error-free file. This is so because the probability of having damaged areas at the same places on different input files is very low. Using
Welcome to Opera
+
the logfile, only the needed blocks are read from the second and successive copies.
http://www.opera.com/portal/upgrade/
+
</blockquote>
1319089117
+
-1
+
</pre>
+
  
Where the fields are:
+
== Installation ==
* Title
+
=== Debian ===
* URL
+
The package 'ddrescue' actually is [[dd_rescue]], another dd-like program which does not maintain a recovery log.
* date and time (32-bit POSIX or Unix epoch timestamp)
+
<blockquote>
 +
aptitude install gddrescue
 +
</blockquote>
  
== External Links ==
+
== Partition recovery ==
  
* [http://www.opera.com/ Official website]
+
=== Kernel 2.6.3+ & ddrescue 1.4+ ===
* [http://www.opera.com/docs/operafiles/ Opera: Files used by Opera]
+
'ddrescue --direct' will open the input with the O_DIRECT option for uncached reads. 'raw devices' are not needed on newer kernels. For older kernels see below.
  
[[Category:Applications]]
+
First you copy as much data as possible, without retrying or splitting sectors:
[[Category:Web Browsers]]
+
<blockquote>
 +
ddrescue --no-split /dev/hda1 imagefile logfile
 +
</blockquote>
 +
 
 +
Now let it retry previous errors 3 times, using uncached reads:
 +
<blockquote>
 +
ddrescue --direct --max-retries=3 /dev/hda1 imagefile logfile
 +
</blockquote>
 +
 
 +
If that fails you can try again but retrimmed, so it tries to reread full sectors:
 +
<blockquote>
 +
ddrescue --direct --retrim  --max-retries=3 /dev/hda1 imagefile logfile
 +
</blockquote>
 +
 
 +
You can now use ddrescue (or normal dd) to copy the imagefile to a new partition on a new disk. Use the appropriate filesystem checkers (fsck, CHKDSK) to try to fix errors caused by the bad blocks. Be sure to keep the imagefile around. Just in case the filesystem is severely broken, and datacarving tools like testdisk need to to be used on the original image.
 +
 
 +
=== Before linux kernel 2.6.3 / 2.4.x ===
 +
In 2.6.3 the 'raw device' has been marked obsolete. On later kernels ddrescue will use O_DIRECT on the input to do uncached reads.
 +
 
 +
First you copy as much data as possible, without retrying or splitting sectors:
 +
<blockquote>
 +
ddrescue --no-split /dev/hda1 imagefile logfile
 +
</blockquote>
 +
 
 +
Now change over to raw device access. Let it retry previous errors 3 times, don't read past last block in logfile:
 +
<blockquote>
 +
modprobe raw<br>
 +
raw /dev/raw/raw1 /dev/hda1<br>
 +
ddrescue --max-retries=3 --complete-only /dev/raw/raw1 imagefile logfile
 +
</blockquote>
 +
 
 +
If that fails you can try again (still using raw) but retrimmed, so it tries to reread full sectors:
 +
<blockquote>
 +
ddrescue --retrim --max-retries=3 --complete-only /dev/raw/raw1 imagefile logfile
 +
</blockquote>
 +
 
 +
You can now use ddrescue (or normal dd) to copy the imagefile to a new partition on a new disk. Use the appropriate filesystem checkers (fsck, CHKDSK) to try to fix errors caused by the bad blocks. Be sure to keep the imagefile around. Just in case the filesystem is severely broken, and datacarving tools like testdisk need to to be used on the original image.
 +
 
 +
At the end you may want to unbind the raw device:
 +
<blockquote>
 +
raw /dev/raw/raw1 0 0
 +
</blockquote>
 +
 
 +
== Examples ==
 +
 
 +
These two examples are taken directly from the [[ddrescue]] info pages.
 +
 
 +
Example 1: Rescue an ext2 partition in /dev/hda2 to /dev/hdb2
 +
<blockquote>
 +
ddrescue -r3 /dev/hda2 /dev/hdb2 logfile<br>
 +
e2fsck -v -f /dev/hdb2<br>
 +
mount -t ext2 -o ro /dev/hdb2 /mnt<br>
 +
</blockquote>
 +
 
 +
Example 2: Rescue a CD-ROM in /dev/cdrom
 +
<blockquote>
 +
ddrescue -b 2048 /dev/cdrom cdimage logfile
 +
</blockquote>
 +
write cdimage to a blank CD-ROM
 +
 
 +
== Cygwin ==
 +
 
 +
As of release 1.4-rc1, it can be compiled directly in [[Cygwin]] [http://en.wikipedia.org/wiki/Out_of_the_box Out of the Box]. Precompiled packages are available in the [http://cygwin.com/packages/ Cygwin distribution]. This makes it usable natively on [[Windows]] systems.
 +
 
 +
== See also ==
 +
 
 +
* [[aimage]]
 +
* [[Blackbag]]
 +
* [[dcfldd]]
 +
* [[dd]]
 +
* [[dd_rescue]]
 +
* [[sdd]]

Revision as of 05:29, 29 March 2009

ddrescure
Maintainer: Antonio Diaz Diaz
OS: Linux
Genre: Disk imaging
License: GPL
Website: http://www.gnu.org/software/ddrescue/ddrescue.html

ddrescue is a raw disk imaging tool that "copies data from one file or block device to another, trying hard to rescue data in case of read errors." The application is developed as part of the GNU project and has written with UNIX/Linux in mind.

ddrescue and dd_rescue are completely different programs which share no development between them. The two projects are not related in any way except that they both attempt to enhance the standard dd tool and coincidentally chose similar names for their new programs.

From the ddrescue info pages:

GNU ddrescue is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors.

Ddrescue does not truncate the output file if not asked to. So, every time you run it on the same output file, it tries to fill in the gaps.

The basic operation of ddrescue is fully automatic. That is, you don't have to wait for an error, stop the program, read the log, run it in reverse mode, etc.

If you use the logfile feature of ddrescue, the data is rescued very efficiently (only the needed blocks are read). Also you can interrupt the rescue at any time and resume it later at the same point.

Automatic merging of backups: If you have two or more damaged copies of a file, cdrom, etc, and run ddrescue on all of them, one at a time, with the same output file, you will probably obtain a complete and error-free file. This is so because the probability of having damaged areas at the same places on different input files is very low. Using the logfile, only the needed blocks are read from the second and successive copies.

Installation

Debian

The package 'ddrescue' actually is dd_rescue, another dd-like program which does not maintain a recovery log.

aptitude install gddrescue

Partition recovery

Kernel 2.6.3+ & ddrescue 1.4+

'ddrescue --direct' will open the input with the O_DIRECT option for uncached reads. 'raw devices' are not needed on newer kernels. For older kernels see below.

First you copy as much data as possible, without retrying or splitting sectors:

ddrescue --no-split /dev/hda1 imagefile logfile

Now let it retry previous errors 3 times, using uncached reads:

ddrescue --direct --max-retries=3 /dev/hda1 imagefile logfile

If that fails you can try again but retrimmed, so it tries to reread full sectors:

ddrescue --direct --retrim --max-retries=3 /dev/hda1 imagefile logfile

You can now use ddrescue (or normal dd) to copy the imagefile to a new partition on a new disk. Use the appropriate filesystem checkers (fsck, CHKDSK) to try to fix errors caused by the bad blocks. Be sure to keep the imagefile around. Just in case the filesystem is severely broken, and datacarving tools like testdisk need to to be used on the original image.

Before linux kernel 2.6.3 / 2.4.x

In 2.6.3 the 'raw device' has been marked obsolete. On later kernels ddrescue will use O_DIRECT on the input to do uncached reads.

First you copy as much data as possible, without retrying or splitting sectors:

ddrescue --no-split /dev/hda1 imagefile logfile

Now change over to raw device access. Let it retry previous errors 3 times, don't read past last block in logfile:

modprobe raw
raw /dev/raw/raw1 /dev/hda1
ddrescue --max-retries=3 --complete-only /dev/raw/raw1 imagefile logfile

If that fails you can try again (still using raw) but retrimmed, so it tries to reread full sectors:

ddrescue --retrim --max-retries=3 --complete-only /dev/raw/raw1 imagefile logfile

You can now use ddrescue (or normal dd) to copy the imagefile to a new partition on a new disk. Use the appropriate filesystem checkers (fsck, CHKDSK) to try to fix errors caused by the bad blocks. Be sure to keep the imagefile around. Just in case the filesystem is severely broken, and datacarving tools like testdisk need to to be used on the original image.

At the end you may want to unbind the raw device:

raw /dev/raw/raw1 0 0

Examples

These two examples are taken directly from the ddrescue info pages.

Example 1: Rescue an ext2 partition in /dev/hda2 to /dev/hdb2

ddrescue -r3 /dev/hda2 /dev/hdb2 logfile
e2fsck -v -f /dev/hdb2
mount -t ext2 -o ro /dev/hdb2 /mnt

Example 2: Rescue a CD-ROM in /dev/cdrom

ddrescue -b 2048 /dev/cdrom cdimage logfile

write cdimage to a blank CD-ROM

Cygwin

As of release 1.4-rc1, it can be compiled directly in Cygwin Out of the Box. Precompiled packages are available in the Cygwin distribution. This makes it usable natively on Windows systems.

See also