- Insert Micro SD Card into its adaptor and plug to PC
- Issue Command df -h from Terminal to know its name [see figure below].
We see micro SD card was assigned as /dev/sdb1 and /dev/sdb2. mounted as /media/avpulsa/boot ..
Above that there was /dev/sdc1 it was a USB Drive that I plan to save backup in it, but got fail because it was formatted as FAT32 which has limited file size to 6GB.
- Umount them using their mounted name. eg Umount /media/avpulsa/boot or use nautilus file manager.
Important:
- /dev/sdb1 and /dev/sdb2 is a name for partition in micro SD card
- /dev/sdb [without number] is a name for assigned to whole micro SD card. Since we will back up the whole micro SD card, this location name is what we notice.
- /dev/sdb1 and /dev/sdb2 is a name for partition in micro SD card
- Now create a folder to hold backup file, in my case I plan to back it up into another partition and new folder.
- Type sudo dd if=[source: micro SD card location name] of=[destination: directory and name file] bs=4M
As I mentioned before, I will back it up in another partition, in my case it was /media/avpulsa/D3 in new Folder I create and name it as RaspiBackup and I will make a img file with name raspi.img, so complete location is /media/avpulsa/RaspiBackup/raspi.img
So I type:
sudo dd if=/dev/sdb of=/media/avpulsa/D3/RaspiBackup/raspi.img bs=4M - Type sudo sync After minutes when it finished [see figure above] to flush all process.
If need to restore just follow those steps [exclude umount part] whith file img as source and /dev/sdb as destination.
Summary commands:
- df -h
- umount /media/avpulsa/boot
- sudo dd if=/dev/sdb of=/media/avpulsa/D3/RaspiBackup/raspi.img bs=4M
No comments:
Post a Comment