Last active
March 29, 2021 17:16
-
-
Save mariotpc/944b49ee602330e654a062beb5784dba to your computer and use it in GitHub Desktop.
Backup and Restore SD Card - Raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To Backup on SD card: | |
Code: Backup | |
sudo dd bs=4M if=/dev/sdb | gzip > /home/your_username/image`date +%d%m%y`.gz | |
This will compress the image using gzip. | |
To restore the backup on SD card: | |
Code: Restore | |
sudo gzip -dc /home/your_username/image.gz | dd bs=4M of=/dev/sdb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment