Skip to content

Instantly share code, notes, and snippets.

@PetrGlad
Created January 11, 2013 10:36

Revisions

  1. PetrGlad created this gist Jan 11, 2013.
    7 changes: 7 additions & 0 deletions backup drive contents (dd) to samba share
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # From http://www.joescat.com/backup/disk_image.html

    mount -o username=name,password=secret //server/share backup
    dd if=/dev/sda | gzip -c | split -b 638m - backup/backup.img.gz.

    # Restoration
    cat backup/backup.img.gz.* | gzip -dc | dd of=/dev/sda