Cloning a card means making a bit-for-bit copy into an image file kept on your computer. You can then write it back to the same card or to another one — handy when a card starts to fail, or before a risky operation.
Two cards with the same advertised capacity are never exactly the same size. An image taken from a 32 GB card of one brand may be too large for a 32 GB card of another brand. To stay safe, always restore onto a larger card.
In most cases, no — and there are much faster ways:
| What you want to back up | The right method |
|---|---|
| Your games, saves and settings | Copy the share folder to your computer over the network share |
| Just your configuration | Copy share/system/recalbox.conf |
| Moving to a bigger card | Reflash Recalbox onto the new card, then copy your share folder back |
| An exact state, system included | Cloning, described below |
The best safety net is still to keep your data on external storage: system and data are then separate, and a reinstall costs you nothing.
Read creates the image file, Write restores it.Pick a destination file with the .img extension, select the card's drive, then Read. Expect several tens of minutes depending on the card size.
The resulting file is the full size of the card, not the size of the data: a 128 GB card gives a 128 GB file. Compress it afterwards (7-Zip,
gzip): empty areas compress extremely well.
dd command in Terminal, as on Linux (get the device name with diskutil list).Plug the card in and identify its device:
lsblk
or:
sudo fdisk -l
Create the compressed image (replace sdX with the device you spotted — the whole card, not a partition: sdb, not sdb1):
sudo dd if=/dev/sdX bs=4M status=progress | gzip -9 > ~/recalbox-backup.img.gz
gunzip -c ~/recalbox-backup.img.gz | sudo dd of=/dev/sdX bs=4M status=progress
sync
Check the device name three times. One wrong letter with
ddwipes your computer's own disk, with no confirmation and no way back.
The status=progress option displays progress. On older dd versions that do not support it, open a second terminal and run:
watch -n 5 sudo pkill -USR1 -x dd
Put the card back in the Recalbox and boot. If you restored onto a bigger card, the extra space is not used automatically: the SHARE partition keeps its original size. To take advantage of it, it is simpler to flash Recalbox cleanly onto the new card and copy your share folder over.