Backs up an SD card or Flash drive interactively as a compressed image.
Restores a previously backed up compressed image to a similar size or larger device.
Suitable for backing up Raspberry Pi and similar operating system cards.
Make the script executable:
chmod +x sdcbr
Run as root and follow the prompts.