I made a backup of an SD card with DD. the SD card was 16Gb in size, the backup was completed using the following command:

```
sudo bs=4M dd if=/dev/disk2 | gzip > pi_sd_prayertime.gz

```

pi\_sd\_prayertime.gz size is : 1GB

I would like to restore this backup to a smaller 4GB SD card. I have tried numerous attempts but the restored sd card is not recognized and is unreadable at the end.

I do understand that the size difference is the issue, here is what I have attempted so far:

```
sudo dd bs=1m if=pi_sd_prayertime.gz of=/dev/disk2 count=31116288

```

Note that 31116288 is (the sector end + 1) of the existing disk where the original backup is created from