Featured Post

My favorite links (ranked)

#1  Linux laptop powertuning painlessly (almost) #2 hard-drive-recovery #3 Chromebook Specifications #4 Internet BMW riders   #5 Findagra...

Thursday, December 4, 2025

Backing up partitions on a system

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/sdXN
Notes: See notes just above... same status recommended. Also the target
partition must be large enough to hold all unzipped data content. 

 

No comments:

Post a Comment

Comments welcome!