INFORMATICS

The Best

Przełącznik języka

Zaproś mnie na KAWE

Jeżeli podoba Ci się strona i chcesz wspomóc projekt!

Postaw mi kawę na buycoffee.to

This Site

Płatnik

CMS

Hardware

Uncategorised

Emulators

Powershell

Storage Array

DNS

Antivirus program

Licznik

3.png0.png4.png1.png2.png2.png5.png
Today122
Yesterday1207
This week6107
This month16126
Total3041225

Visitor Info

  • IP: 18.188.175.66
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

4
Online

piątek, 22 listopad 2024 02:18

creating a disk image

Gwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywna
 

Creating a Disk Image

One of the way to clone a drive is to create a disk image that you can move around and restore as you would do with a bootable USB.

Creating image files allows you to save multiple backups to a single destination, such as a large portable hard drive. Again, this process only requires one command:

dd if=/dev/sdX of=path/to/your-backup.img

To save space, you can have dd compress your backup.

dd if=/dev/sdX | gzip -c > path/to/your-backup.img.gz



Restoring a Drive With dd

First command:

dd if=/dev/sdY of=/dev/sdX

When restoring from an image file, the same concept applies:

dd if=path/to/your-backup.img of=/dev/sdX

If your image file is compressed, then things get a little different. Use this command instead:

gunzip -c /path/to/your-backup.img.gz | dd of=/dev/sdX

To be clear, gunzip is "g unzip," as in the opposite of "g zip." This command decompresses your backup. Then dd replaces the existing drive with this image.

 

Parameters to Consider

You can alter your command by sticking a parameter at the end. By default, dd can take a while to transfer data. You can speed up the process by increasing the block size. Do so by adding bs= at the end.

dd if=/dev/sdX of=/dev/sdY bs=64

This example increases the default block size from 512 bytes to 64 kilobytes.

conv=noerror tells dd to continue despite any errors that occur. The default behavior is to stop, resulting in an incomplete file. Keep in mind that ignoring errors isn't always safe. The resulting file may be corrupted.

conv=sync adds input blocks with zeroes whenever there are any read errors. This way data offsets remain in sync.

You can combine these last two as conv=noerror,sync if you so desire. There is no space after the comma.

Search