ddrescue installed from the universe repository in my installed system.
You can install it in a live-only or persistent live system too. In that case you need to add 'universe' to standard Ubuntu (while it is already there in the live systems of many of the community flavours, for example Lubuntu),
sudo add-apt-repository universe
and then run
sudo apt update
sudo apt install gddrescue
gddrescue is the name of the package, which contains the program
The following link contains a description of how to use it to clone a failing drive,
Repair the partition table and file system of a pendrive
Scroll down to "Advanced repair of a partition table, file system and/or recovery of files"
Please notice that the manual (the info page)
is very good. You can try according to one of the examples (in