There is damaged SD card, some problems with connectors I guess. After plugging in this SD Card mounts and becomes readable for about 30 seconds and data is reachable for download then for some time the card is gone, then connects again and falls ... and so on. My question is: how can I read data from the SD card? I see it like this: one should write some script in bash, where data would be downloaded in infinite loop, usingdd or cpbut for me is unclear, what to do if SD umounts and goes away.. how can I remember the stop point to contiue again when SD card returns? If use command sleep()then what should stand for argument? When the card connects again is unclaer, it can be 20 seconds, 30, 44 seconds.. and how to continue the process from the point of stop? There is a way to delete copied data, but it is troublesome.What do you think which way is the best one and how script should be organized?Thank you in advance!
Read data from damaged SD card
sd card
As cp and dd are no good when it comes to resume a transfer I would use rsync -avP <yoursdcardmount> <dest>and repeat it until it returns no errorIt will copy as much as it can then it will restart where it ended.Finally I'll try to check integrityrsync -avc <yoursdcardmount> <dest>If you come to realise that accessing a particular file is the source of the error then add it to an exclude list.