Doublegene wrote:Is there any recommended software tool for backup an image of the SD card if using MacOS ?
Will there be an update later, to run bigger SD cards like 64GB /128GB ...?
Thx a lot, BR Marco
The mac is Unix, so it has built-in capability to deal with things like this.
See: https://thepihut.com/blogs/raspberry-pi-tutorials/17789160-backing-up-and-restoring-your-raspberry-pis-sd-card
I created a backup disk image on my Mac that I named "ASIair_backup.dmg" and this is a complete clone of the card.
The key is to use a utility called "dd" (disk duplicate). If you open a "Terminal" window on the Mac and type "man dd" (man = manual pages) it'll pull up the documentation. In any case, "dd" can clone a raw device and it operates one block at a time. The partitions, filesystem types, etc. are not important because it's working at the device level (it is literally cloning whatever bits are on the device and ignores any special meaning that anything might have).
Within the mac "Terminal" utility, I type the command "diskutil list" (tells the mac to run the command line version of Disk Utility and simply "list" the devices and filesystems it can see) it shows several devices on my Mac ... but one is the ASIair SDcard.
tim@timsimac:~$ diskutil list
(I removed the listings for /dev/disk0 through /dev/disk3 since they don't have anything to do with the ASIair)
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *127.9 GB disk4
1: Windows_FAT_32 BOOT 26.8 GB disk4s1
2: Linux 3.1 GB disk4s2
3: Linux 224.4 MB disk4s3
4: Linux_Swap 955.3 MB disk4s4
You DO need to make sure that the disk is not "mounted". The Mac will likely auto-mount the "BOOT" partition when you insert it. Make sure you "eject" the disk (you can either right-click the "BOOT" icon and tell it to "eject" or drag to trash, etc. Just don't pull the card out of the mac after ejecting ... leave it in.
In my example it came up on /dev/disk4 ... but on your mac it may come up as another device (e.g. /dev/disk2, /dev/disk3, ... etc.) I'll just use /dev/disk4 as an example.
To back the disk up as a disk image to your Mac, type:
sudo dd if=/dev/disk4 of=~/Desktop/ASIair_backup.dmg bs=1m
I'll break this down...
"sudo" is a prefix that tells commands to run as root (root = the super-user and "su" stands for super-user. If you don't prefix the command with "sudo" then it will fail.
dd is "disk duplicate" ... this is a block-level copy utility that can work on any device.
if=/dev/disk4 means the "input file" is /dev/disk4 (obviously you would substitute the disk number of your device).
of= (this refers to the "output file"
~ (tilde) means that to start the file path from YOUR home directory instead of the top of the root volume on the Mac.
So of=~/Desktop/ASIair_backup.dmg means "starting from your home directory, put the contents in a file named "ASIair_backup.dmg" located in the Desktop folder.
bs=1m means that when it copies files one block at a time, use 1 megabyte size blocks. This helps speed things along (a little).
When you hit the 'return' key to enter the command, it will begin copying the file. This will take a LONG time (the dd utility is NOT multi-threaded ... unfortunately).
To restore, you reverse this:
E.g. insert the target SD card and type:
sudo dd if=~/Desktop/ASIair_backup.dmg of=/dev/disk4 bs=1m
That command will clone the image from ASIair_backp.dmg back onto the /dev/disk4 device (presumably this would be a replacement card.)
Be patient... dd takes a while to work. It does NOT give you feedback or progress. It wont give you any messages until it's completely done with the copy. Also, don't let your mac "sleep" while this happens. (I use Apple "Performance Monitor" utility in the "Disk" tab to keep an eye on the "dd" process status because you can see the "bytes read" and "bytes written". When it gets to 32GB, it's done.)
(BTW, note that the card in my example is a 128GB card ... it's my clone ... but if you add up all the partitions you'll notice that only about 32GB are used. There's currently no point in using a card larger than 32GB.)