0

I am currently running Raspbian on Raspberry PI 3 and the SD memory card I've been using as hardrive on my pi is somehow got damaged probably from using it for a very long time.

Whenever I boot or turn my pi on, on the display it says among other things memory location is not readable OR Failed mounting SD Card. Then, it eventually times out waiting at the Console Prompt. No GUI is loaded. Well, after this, I would power recycle the PI again hoping that Raspbian Desktop will be loaded. Desktop may or may not load. I power recycle it again. Eventually, everything goes through and Raspbian Desktop is finally loaded. I've done a lot of work on this Raspbian PI in setting it up. If and when the SD card finally FAILS COMPLETELY, I will loose a lot and will have to start from scratch building it back again.

I have thought about Cloning and I do clone PI's SD card using Win32DiskImager on window. This program is fantastic. However, when I try to clone the damaged SD Card, it fails and reports that some of the memory location is not READABLE. Even though I have all the files from the damaged SD card saved and/or backed up, I will loose all the setup and settings for a lot of programs I downloaded and installed.

So, my question is this. Can you backup or save the current session? So, I can save the programs setups or settings for installed programs.

1

It's unclear why you're just now looking for a solution, given the importance you attach to your files, and the impact of a loss. But I'll leave that for you to ponder. In the meantime, I would guess that each time you use the SD card to boot and run, your prospects of permanent loss increase. I'd stop that right away, and get on with the backup process.

Given the status of things as you've reported, I would attack on two "fronts":

  1. Most of your configuration work will be in one of two locations: /etc and /home/pi. Therefore, back those up as follows:
cd /
sudo tar czf pi_etc.tar.gz etc
cd /home
sudo tar czf pi_home.tar.gz pi

Move those two tarballs to an external drive asap.

  1. Follow DougieLawson's advice and make a "live" backup image. If you don't have an SD card reader to plug into your Rpi, use a thumb drive. Insert your drive, and mount it. Assuming a mount at /dev/sda:

dd if=/dev/mmcblk0 of=/dev/sda bs=1M.

Once you've got the image file, you may wish to try ddrescue as @eftshift0 suggested. I have no experience with it, and I can't comment further.

Good Luck & let us know how you get on - your feedback will help others.

0

Perhaps ddrescue could be what you are looking for to recover the bits and pieces that you care about from the memory card.

https://www.gnu.org/software/ddrescue/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.