Hey @Recep ,
In macOS, you can go into Terminal and use the DD command.
First, find the identifier of your drive. To do this, type in: diskutil list
You'll then see a bunch of drives/partitions. Find your drive (by looking at the sizes) and take note of the identifier (ie., /dev/disk1)
Now, use the DD command by doing the following:
dd if=/dev/disk9s1 of=/location/where/you/want/to/save.img
Replace 9 with the number with the identifier of your drive.
When you want to restore the IMG, simply do the following command:
dd if=/location/of/img.img of=/dev/disk9s1
Replace 9 with the identifier of your drive.
Hopefully that helps!