> For the complete documentation index, see [llms.txt](https://docs.ramsdenj.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ramsdenj.com/introduction-2/introduction-1/dd.md).

# dd

The following page contains uses for the `dd` command.

### Image a Disk

Using `dd`, with disk sdX, create a gzipped image:

```
dd if=/dev/sdX conv=sync,noerror bs=64K | gzip -c  > /path/to/backup.img.gz
```

If fat32, split into volumes:

```
dd if=/dev/sdX conv=sync,noerror bs=64K | gzip -c | split -a3 -b2G - /path/to/backup.img.gz
```

Save the drive geometry.

```
fdisk -l /dev/sdX > /path/to/list_fdisk.info
```

To restore a system:

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

Or, if it's been split:

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