Backup NVME system

1.Backup preparation

Open the terminal of the Ubuntu computer (virtual machine) system and enter the following command to install the partition management tool gparted

img

Remove the solid-state drive from the motherboard, insert it and connect it to the computer (virtual machine). At this time, the computer will automatically recognize the solid-state drive (requires a solid-state drive box).

Open the application repository of the computer (virtual machine), search for and open gparted

image-20220815154055172

Attention: Incorrect operation may cause the system or files to malfunction. In this step, it is important to select the correct disk device number.

 

2、Record partition information

Record disk device number:/dev/sdb

Enter the following command to view partition information, record the numbers in the Free Space row and Start column,Pay attention to removing the last unit s.

The/dev/sdb parameter must be specified, which is consistent with the disk device number viewed in the previous step.

If parted_ The info.sh file does not have permission to run. Enter chmod+x parted_ Add permissions to info.sh.

image-20220815163507764

parted_info.sh Content

 

3、Backup image IMG files

Open the system terminal, and the storage space of the computer (virtual machine) must be greater than the image.

if=/dev/sdb:For the disk device number found in the first step of=backup.img:Is the name of the backup bs=512:Indicates block size count=27875328:Represents the backup size, which is obtained from the second step.

image-20220815164843642

Restart a terminal and run the following command to check the progress.

image-20220815164737048

Wait for the backup to complete.

4、Copy Mirror to Windows

Due to the fact that the backed up image is on a Linux computer (virtual machine), it is necessary to turn on the shared folder function in the virtual machine to transfer the files to Windows.

Click on the settings of the virtual machine

image-20220816103039458

Click on 'Options' -' Shared Folder '-' Always Enable '-' Add ', and then add the location of the Windows computer as a shared folder,Taking adding to path D:\Virtual Machines\share as an example in the following figure.Click OK to save the configuration.

image-20220816103155807

 

Copying Mirror Files to a Shared Folder

So far, the mirror backup is complete.