Created
November 24, 2018 16:17
-
-
Save tondrej/4b67777ea4884fbc17830314ab0f7d16 to your computer and use it in GitHub Desktop.
backup.sh
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
#!/bin/bash | |
# http://errietta.me/blog/luks-clonezilla/ | |
cryptsetup luksOpen /dev/sda5 crypt | |
modprobe dm-mod | |
vgchange -ay | |
partclone.ext4 -c -s /dev/sda1 -o ./sda1.img | |
tar -jcvf sda1.img.tar.bz2 sda1.img && rm sda1.img | |
partclone.ext4 -c -s /dev/mapper/mint--vg-root -o ./mint.img | |
tar -jcvf mint.img.tar.bz2 mint.img && rm mint.img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment