>>107091707
since already-failing drives likely have limited time and/or power cycles left to live, you should really read up on the functions of ddrescue before any attempt though
the "plain" ddrescue command does 5 passes normally (I think forward-reverse-fw-rw-fw), but to get the most data with the least wear/time, most sites recommend the --no-scrape
option for (I think 3) initial passes:
ddrescue --no-scrape [INPUT_DRIVE/PARTITION_PATH] [OUTPUT_IMG_PATH].img [OUTPUT_MAP_PATH].map
(.log is older terminology, but the same)
you might also have to monitor it, as mine constantly "gave up" before completing a pass, and would skip to the next and next passes (at obviously too high a read rate) before declaring "Finished" on the now-non-resumable log
if your drive is that damaged and constantly quits on you, ddrescue allows calmly pausing jobs with Ctrl+C and waiting for it to stop itself, so at certain points you can safely stop the job, copy the current .map/.log twice to something like "at100GB.map" & "at100GB_COPY.map", and resuming from either the original .map/.log or "at100GB".map/log, then overwriting them when it fucks up to resume before the fuckup point
you may also want to read up on --idirect --unidirection --reverse --retry-passes=
options before starting anything
for example, if I were to redo trying to ddrescue my quitting drive again, I'd go through a single pass at a single direction, before then doing the same in reverse:
ddrescue --no-scrape --unidirection --retry-passes=1 /IN /OUT.img /OUT.map
ddrescue --no-scrape --unidirection --reverse --retry-passes=1 /IN /OUT.img /OUT.map
reverse passes also seem essential, as they're able to access shit forward can't
good luck
(pic is an example from https://www.tauceti.blog/posts/clone-failing-harddisk-partition-with-ddrescue/)