Handling partition backup archives
Using ntfsclone...
Create compressed archive:
sudo ntfsclone --save-image -o - /dev/sdXn | gzip -c > /path/to/archive/backup.img.tgz
Notes: Source device should not be mounted, destination path must point to another mounted device.
Restoring from backup above:
gunzip -c backup.img.gz | ntfsclone --restore-image --overwrite /dev/hda1 -
Notes: See notes just above... same status recommended. Also target partition
must be large enough to hold the unzipped data content.
Using dd...
Create compressed archive:
sudo dd if=/dev/sdXN | gzip -c > /path/to/backup/filename_img.tgz
Notes: source device should not be mounted, destination path must point to another mounted device.
Restoring from backup above:
sudo gunzip -c /path/to/backup/filename_img.tgz | dd of=/dev/sdXNNotes: See notes just above... same status recommended. Also the targetpartition must be large enough to hold all unzipped data content.