back up and restore img to sd card
at 2016-09-18 14:20:00.
if you create a custom os and want to have a backup incase of a problem you can use these commands to backup and restore your .img file for a raspberry or banana pi
backup
sudo dd bs=4M if=/dev/sdb | gzip > /root/image`date +%d%m%y`.gz
restore:
sudo gzip -dc /root/image.gz | dd bs=4M of=/dev/sdb