After several hours the USB enclosure is accidentally unplugged and the process stops. The senior administrator wants to resume the clone later without re-reading the blocks that were already copied and still keep a record of the bad sectors for additional recovery passes. Which command accomplishes this goal?
GNU ddrescue keeps a mapfile that records which areas of the source have been copied, which are pending, and which produced errors. Re-running ddrescue with the same mapfile skips sectors that are already good and focuses on the remaining ones, so the job can be safely interrupted and resumed as many times as needed. The -f option allows overwriting an existing output file, and -n tells ddrescue to make the initial fast pass that skips over unreadable blocks.
dd on its own (conv=noerror,sync) will continue past read errors, but it has no log file, so an interrupted run must start over or rely on manual offsets.
rsync operates on files and directories, not raw block devices; even if it were pointed at a device node it would copy the entire file again and would not track bad sectors.
tar simply writes a sequential archive; it cannot resume a partial image or handle sector-level errors.
Therefore the ddrescue command that specifies an output image and a mapfile is the only choice that meets every requirement.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a mapfile in ddrescue and why is it important?
Open an interactive chat with Bash
What is the purpose of the '-n' and '-f' options in ddrescue?
Open an interactive chat with Bash
How does dd differ from ddrescue when handling disk errors?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access