Case scenario:
$ sudo fdisk -l
Disk /dev/sda: 223,6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x13a30a5a
Device Boot Start Final Sectors Size Id Type
/dev/sda1 * 2048 1333247 1331200 650M 27 WinRE NTFS hidden
/dev/sda2 1333248 264058879 262725632 125,3G 7 HPFS/NTFS/exFAT
/dev/sda3 264060926 468860927 204800002 97,7G 5 Extended
/dev/sda5 264060928 434049023 169988096 81,1G 7 HPFS/NTFS/exFAT
/dev/sda6 434051072 464771775 30720704 14,7G 83 Linux
/dev/sda7 464773120 468860927 4087808 2G 82 Linux swap / Solaris
Windows 10 is installed on /dev/sda2
and I assume that /dev/sda1
is a hidden partition from the same Windows system.
How can I backup my Windows 10 installation from Linux in order to restore it later?
Further data upon request:
- By "Installation" I mean the "full partition" (or partitions) required to return Windows to the moment the cloning was made.
- Being able to restore to the same system (computer, hardware) and even hard drive would enough. I.e: I installed Windows 10, made backup, and a few months ago I want to restore the backup I made, so there is no need to perform the full installation of Windows 10 (drivers, printers, programs…etc) again.
Tested until now (all tests performed on the same computer with the same partition layout):
- PartImage (cloning
sda1
andsda2
): not working. The restored operating system will not boot. - FSArchiver (cloning
sda1
andsda2
): not working. The restored operating system will not boot.
Best Answer
pv
methodYou could use
pv
(man page) utility like so:Of course you could become root first:
And then just do the backup:
And then when needed do the restore:
Notes
This basically does the same job as
dd
in the other answer, but is faster and shows progress.This method may be slower than
rsync
, but that just copies files, which is not intended.It copies everything 1:1, a perfect copy might you say.
You need also the boot sector for it to boot later on. The simplest method is to backup the whole drive.
To show progress with
dd
(man page), you could just add to the command:Tip
For you to be able to effectively compress the image afterwards, don't forget to zero free space.