Page 1 of 1

[SOLVED] Save the State of the SD card.

Posted: Sat Apr 14, 2012 9:31 pm
by asp5
Hi all,

I was wondering if it was possible to save the state of a SD card on a computer, and then format the SD card. If for some reason we want to get the old state back can we use the saved image of the SD card to make it same as before. If it is possible, pls let me know the tool that helps me do this.

Thanks,
asp5

Re: Save the State of the SD card.

Posted: Sun Apr 15, 2012 2:51 am
by xenopeek
Sure, plug in your SD card and from a terminal run (that is the letter l at the end, not number 1):

Code: Select all

sudo parted -l
You want to find the disk name of your SD card in the output of this command; it would be something like /dev/sdb or /dev/sdc (the last letter may differ, depending on how many other storage devices you have connected). Once you find the /dev/sdX name of your SD card (probably the last entry listed), proceed to make a backup of your SD card's contents:

Code: Select all

sudo dd if=/dev/sdX of=myfile.img oflag=direct
Replace /dev/sdX with the disk name of your SD card as found above, and myfile.img with how you want to name your backup file. You can later copy the backup back onto the SD card if needed, by reversing if and of, as in "sudo dd if=myfile.img of=/dev/sdX oflag=direct" (be sure to check with the above command the disk name is still the same).

Re: Save the State of the SD card.

Posted: Sun Apr 15, 2012 5:55 pm
by asp5
Thanks Vincent.