04.08.2023

DD utility for Windows backup

We will describe process of creation backups on a Windows Server by exploited Unix—like DD utility.

Introduction

The backup system is an important component of data security. The choice of backup methods and forwarding methods depends on your needs and conditions of use. When setting up a backup, you should take into account the level of data criticality, available storage space, access speed, as well as the level of protection that is required for your data.

The DD utility is primarily designed for Linux—based operating systems, and it offers various commands with specific operands to facilitate file copying. Being one of the oldest utilities, DD creates backups that are compatible with numerous software applications. However, its functionality in the Windows operating system is comparatively limited compared to its Linux counterpart. Notably, the Windows version lacks support for file conversion and block device usage.

Download utility

First of all, we need to download utility then check them for malicious software, unfortunately that step is sufficiently for your security. You need to choose archive in the downloaded files and attach to the service, wait for results. If you will see report like this, then everything is OK:

Screenshot №1 — Report of scanning

Warning! We do not take responsibility for the program available on the site due to the lack of control over the file, download the utility at your own risk.

By opening archive you will see three files, we need to open with .exe format:

Screenshot №2 — List of files

Create backup

For start using utility you need to type that command below, but before go to the executable folder:

cd C:\Users\Administrator.WIN22\Desktop && dd.exe --list

Screenshot №3 — List of program

You can see various of options that you can use with that command, let's solve the problem and task of creation file of folder C disk. For that type the command:

dd if=\\.\c:\tt\1.zip of=c:\tt\disk1.img bs=1440k

Screenshot №4 — Create ISO

Let's break down the command step by step:

Please note: before creating backups, you need to make sure that there is enough unallocated space on the desired disk.

Let's restore information from disk1.img by the command below:

dd if=c:\tt\disk1.img of=\\.\c:\tt\new  bs=1440k

Screenshot №5 — Unpack ISO

Let's break down the command step by step:

Create scheduler

Search in windows bar application Task Scheduler  and open it:

Screenshot №6 — Open task scheduler

After that you will see pop—up window with main field and tab for next configuration, create task:

Screenshot №7 — Task scheduler

Give a Name to a task for recognize process that you start, also you can add description to filed and check the box Run with highest privileges. Set triggers for starting script that we will write after that:

Screenshot №8 — Triggers

Create new text file and enter the lines of code:

# Set the source and destination paths
$sourcePath = "c:\tt\1.zip"
$destinationPath = "c:\tt\disk1.img"
# Read the data from the source file and save it to the image file $sourceContent = Get-Content -LiteralPath $sourcePath -Encoding Byte Set-Content -LiteralPath $destinationPath -Value $sourceContent -Encoding Byte
# Set the source and destination paths for writing back to the floppy disk $sourcePath = "c:\tt\disk1.img" $destinationPath = "c:\new"
# Read the data from the image file and write it back to the floppy disk $sourceContent = Get-Content -LiteralPath $sourcePath -Encoding Byte Set-Content -LiteralPath $destinationPath -Value $sourceContent -Encoding Byte

Screenshot №9 — Script

Save as .bat file, just rename it and replace .txt to .bat, after this copy path to file and enter in the tab Actions in the Scheduler:

Screenshot №10 — Actions

Enter path to the field Program/script or Browse and search script. Go to the next tab Settings:

Screenshot №11 — Settings

And press OK, now we have scheduler task that will run by timer!

Conclusion

The process of creating backups on a Windows Server using the Unix—like dd utility involves a series of steps designed to ensure data security and availability. The backup system holds paramount importance in safeguarding critical data against loss or corruption. Choosing appropriate backup methods and forwarding techniques depends on factors such as data criticality, storage capacity, access speed, and required security levels.

Although the dd utility is primarily intended for Linux—based systems, it can be employed on Windows Servers to achieve data copying. While dd provides various commands and operands for efficient file copying, it's important to note that its functionality on Windows may be less extensive compared to its capabilities on Linux. For instance, certain features, like file conversion and block device usage, might be limited or absent in the Windows version.