You could clone the whole disk or that partition using the dd
command. Something like:
sudo dd if=/dev/sdb5 of=<filename>
sudo dd if=/dev/sdb of=<filename>
I would then run e2fsck
on that partition to see if it can be repaired. I would do both actually to get an image of the entire disk and then one of just that partition.
If it's non-repairable but say you can see files on that partition, I'd create a file copy backup of that partition. Here's a script function I use to copy entire RFS's from one target to another if I have to do this.
# Function to copy the root file system
sudo /usr/local/bin/genext2fs -b 1024 $2
# Resize to 8 Gigabytes to perform the copy
sudo /sbin/resize2fs -f $2 8000000
sudo mkdir -p copy
sudo mount -o loop $2 copy
sudo cp -a $1/* .;
sudo umount copy;
sudo rm -rf copy;
# Check the file system
sudo /sbin/e2fsck -f $2
# Resize it to the minimum number of blocks required
sudo /sbin/resize2fs -M $2
The arguments are $1 is the mounted location for the partition you wish to copy and $2 is the filename you wish to create as your local copy of that file system. In this case it creates an empty ext2 file system, resizes it to be 8 Gigabytes (you'll need to select a size larger than your partition), mounts that empty file system as loop, performs the copy, then it must unmount that loop to perform e2fsck on that file system, and finally resize it where the "-M" resizes it to be the minimum size required. The e2fsck must be performed before the resize, and in fact the resize will not work and warn you that you needed to run e2fsk first. It is a good idea to check and repair the file system anyways, the resize just gets rid of any unused space. After this, you can mount the file-based file system as a loop and read data from it; much like you can if you can read data off that partition now, but with less risk and you can then remove that partition, recreate it if needed and copy data back onto it.