With dd you can easily copy disks, partitions and also optical disks (CDs or DVDs) and create a local backup. But what can you do, if dd runs into problems?
Creating a local ISO backup from your optical DVD drive
One easy and fast way to create a full local ISO backup of your optical disk is the following command using dd:
ck@mint ~ $ isoinfo -d -i /dev/cdrom | grep -i -E 'block size|volume size'
Logical block size is: 2048
Volume size is: 1521176
ck@mint ~ $ dd if=/dev/cdrom of=/tmp/dvd.iso bs=2048 count=1521176 status=progress
Or, as a one-liner that combines reading the logical block and the volume size:
ck@mint ~ $ dd if=/dev/cdrom of=/tmp/dvd.iso bs=$(isoinfo -d -i /dev/cdrom | grep -i "block size" | awk '{print $NF}') count=$(isoinfo -d -i /dev/cdrom | grep -i "volume size" | awk '{print $NF}') status=progress
Note: Only do this once you verified isoinfo gives you the relevant information and numbers!
But optical disks can have scratches or dirt on the surface that makes reading it hard. CDs and DVDs also deteriorate with age. When dd runs into problems reading sectors, it fails with an i/o error:
ck@mint ~ $ dd if=/dev/cdrom of=/tmp/dvd.iso bs=$(isoinfo -d -i /dev/cdrom | grep -i "block size" | awk '{print $NF}') count=$(isoinfo -d -i /dev/cdrom | grep -i "volume size" | awk '{print $NF}') status=progress
100538368 bytes (101 MB, 96 MiB) copied, 42 s, 2.4 MB/s
dd: error reading '/dev/cdrom': Input/output error
49136+0 records in
49136+0 records out
100630528 bytes (101 MB, 96 MiB) copied, 42.0554 s, 2.4 MB/s
Luckily not all hope is lost yet.
ddrescue to the rescue!
A command with a similar name, ddrescue, can often help in such situations. Although "dd" also appears in ddrescue, dd is not used in the background. ddrescue is entirely its own program and is not dependent on dd.
ddrescue is an open source GNU project and therefore available as package in most Linux distributions.
To install ddrescue on Debian, Ubuntu and other Linux distributions using the APT package manager:
ck@mint ~ $ sudo apt install gddrescue
On Fedora, Red Hat, Rocky Linux, AlmaLinux and other Linux distributions using the YUM/DNF package manager:
ck@rocky ~ $ sudo dnf install ddrescue
You can now launch ddrescue in the Terminal:
ck@mint ~ $ ddrescue -b 2048 /dev/cdrom /tmp/dvd4.iso /tmp/dvd.log
Here we use the same block size (-b) as obtained from the isoinfo command before.
When ddrescue reached the ~100MB of the DVD, where dd ran into i/o errors, the counter of read errors started to increase:

However ddrescue continues its work. Although there was read errors, ddrescue was able to rescue 100% of the DVD:
Copying non-tried blocks... Pass 2 (backwards)
ipos: 491517 kB, non-trimmed: 0 B, current rate: 149 kB/s
opos: 491517 kB, non-scraped: 0 B, average rate: 2198 kB/s
non-tried: 0 B, bad-sector: 0 B, error rate: 0 B/s
rescued: 3122 MB, bad areas: 0, run time: 23m 39s
pct rescued: 100.00%, read errors: 1683, remaining time: 0s
time since last successful read: n/a
Trimming failed blocks... (forwards)
Finished
However depending on the optical disk's surface and how good or bad in shape it is, even ddrescue might not always work. In the following example, ddrescue was only successful to rescue 56% of the disc:
Trimming failed blocks... (forwards)
ipos: 437661 kB, non-trimmed: 0 B, current rate: 0 B/s
opos: 437661 kB, non-scraped: 1184 MB, average rate: 138 kB/s
non-tried: 0 B, bad-sector: 170833 kB, error rate: 26624 B/s
rescued: 1760 MB, bad areas: 13083, run time: 3h 31m 22s
pct rescued: 56.50%, read errors: 110568, remaining time: n/a
time since last successful read: 1h 23m 37s
Scraping failed blocks... (forwards)
Advise: Digitize your DVDs
As mentioned before, optical disks (CDs and DVDs) deteriorate with age. You can extend their "lifetime" by storing them in proper cases, away from light. But even then, the ageing process runs.
If you have data, such as pictures or backups, somewhere stored on CDs or DVDs, do not wait much longer. Digitize the DVDs! The same obviously also goes for your movies or TV shows collection on DVDs.











