Wednesday, 11 June 2008

creating image of NTFS drive under Linux - ntfsclone

use rescucd ( with ntfsclone in ver.2.0) for this task.

0. mount backup medium on /mnt

1. save NTFS image:
ntfsclone --save-image --output /mnt/winxp.img /dev/sda2

2. restore NTFS image from image file:
ntfsclone --restore-image --overwrite /dev/sda2 /mnt/winxp.img

if your target backup drive is limited to some smaller file size (like 4GB) you might want to compress and split the image into multiple files:
e.g. (all one line)
ntfsclone -s -o - /dev/sda2 |gzip|split -b 2000m -  /mnt/winxp.img.gz_

this will create 2GB big multiple files for that image

To restore: (assuming 3 files were created aa, ab, ac)
cat /mnt/winxp.img.gz_aa /mnt/winxp.img.gz_ab /mnt/winxp.img.gz_ac  |gunzip -c|ntfsclone --restore-image --overwrite /dev/sda2 -

No comments: