Created
December 6, 2015 07:29
-
-
Save gautamkrishnar/928586d69d035bb9c728 to your computer and use it in GitHub Desktop.
Backup your hdd to an image with following simple command:
This file contains 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
dd bs=4096 conv=noerror,sync if=/dev/sdc1 | gzip -c > img.gz |
This file contains 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 restore backup image: | |
gunzip -c img.gz | dd of=/dev/sdc1 |
This file contains 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
#Verify with the following: | |
sha1sum img | |
sha1sum /dev/sdc1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment