Skip to content

Instantly share code, notes, and snippets.

@kramarama
Last active August 29, 2015 13:57
Show Gist options
  • Save kramarama/9695088 to your computer and use it in GitHub Desktop.
Save kramarama/9695088 to your computer and use it in GitHub Desktop.
backup /boot partition
# backup /boot
dd if=/dev/sda1 conv=sync,noerror bs=1024K | gzip -c > /media/db471742-b20a-cf01-d047-1342b20acf01/boot.sda1.img.gz
# backup /
dd if=/dev/sda2 conv=sync,noerror bs=1024K | gzip -c > /media/db471742-b20a-cf01-d047-1342b20acf01/root.sda2.img.gz
# backup /var
dd if=/dev/sdb6 conv=sync,noerror bs=1024K | gzip -c > /media/db471742-b20a-cf01-d047-1342b20acf01/var.sdb6.img.gz
####################
# restore /boot
gunzip -c /media/db471742-b20a-cf01-d047-1342b20acf01/sda1.img.gz | dd of=/dev/sda1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment