Create Command Line Backup to Protect Your Computer  

Command Line Backup, Clone and Ram disk


Qiling Disk Master can be controlled from the Command Line, allowing for more advanced use, instead of relying on the Windows interface.

Command Line Syntax

1. To open the Command prompt as administrator, follow these steps:
To run Command Prompt as an administrator, click Start, right-click on Command Prompt, and select "Run as Administrator" from the context menu.
Or
Press the Windows key + R to open the "Run" window, then type "cmd" to open the Command Prompt.

2. Navigate to the installation directory of Qiling Disk Master by typing in the command to change the directory to the desired path.
Go to the "C:\Program Files\Qiling\Disk Master" directory, replacing "C:\Program Files\Qiling\Disk Master" with the actual location where you installed the program.
This means open the path--To run Qiling Disk Master, navigate to the installation directory, which is "C:\Program Files\Qiling\Disk Master", and execute the program from there. The path should match the directory where the program was installed.

3. The options below specify all the Command line parameters that can be used to constitute a fully functional command, e.g:
DiskMasterX.exe /b new /t disk /s 0 /d "d:\disk" /n "Backup Disk0"
This commands DiskMasterX.exe to start a new disk backup and backup disk 0, next save the backup file to “D:\disk” and name the backup file as “Backup Disk0”

Syntax:

{} are the required parameters
[] are the optional parameters

Show Help

Input

DiskMasterX /?

Type "DiskMasterX /?" in Command prompt to look for help

Output

DiskMasterX { /b | /c | /r | /l | /ram | /? }

-"DiskMasterX" has six functions, which are backup(/b), clone(/c), restore(/r), list(/l), ramdisk(/ram), and help(/?)

DiskMasterX /l /?

-display the complete usage of the list command

DiskMasterX /b /?

-display the complete usage of the backup command

DiskMasterX /c /?

-display the complete usage of the clone command

DiskMasterX /r /?

-display the complete usage of the restore command

DiskMasterX /ram /?

-display the complete usage of the ram disk command

Command Line for Backup

For a new backup, the required parameters are:

Parameters

Description

{/b}

Specify the type of backup, it could be one of the following: new, inc, dif or full
new - create a new backup task

{/t}

Specify the type of source, it could be one of the following: system, disk, part or file
system - backup your system; disk - backup disks; part - backup partitions; file - backup files

{/s}

Specifies the source for the backup:
To create a disk backup, specify the disk number, such as /s 0.
For a partition or dynamic volume backup, specify the drive letter, e.g. /s C.
For partitions without a drive letter, specify the partition number, such as /s 0:1.
For a file backup specify the file path (The last character of the directory path must be "\"), e.g. /s "d:\path\|"

{/d}

Destination path for saving the backup image, e.g. /d "D:\Path\File"

For incremental and differential backup, the required parameters are:

Parameters

Description

{/b}

I'll rewrite the text in one paragraph shortly. However, I need you to specify the type of backup, which could be one of the following: inc (incremental), dif (differential), or full.
inc - create an incremental backup based on the last backup; dif - create a differential backup based on the last full backup; full - create a subsequent full backup.

{/d}

Specify the main file for creating incremental or differential backups from (If there is only one backup task in the directory, you can specify it as a directory), e.g. /d "d:\My Storage\disk backup"
Create an incremental or differential backup based on an image file located at "D:\My Storage\disk backup\dm.fvd".

The following are some optional parameters:

Parameters

Description

[/n]

Assign a name for the backup to distinguish it from others

[/o]

The compression level of the image file could be one of the following: 0, 1 or 2
0 - no compression, 1 - fast standard compression, 2 - higher compression level, but takes more time to process.

[/e]

Encrypt image file, e.g. /e "123" means "123" becomes the password for the image file.

[/u]

Username; if you backup to a network and the username is required to access the network. You may set up the username by using this parameter, e.g. /u "admin"

[/p]

If you back up your data to a network location that requires a password to access, you can specify the password in the backup settings using the format /p "password". For example, if the password is "123456", you would enter it as /p "123456".

[/m]

Size in MB for splitting a large image file into smaller files.
This specifies the maximum size of each file; e.g. /m 1490.

[/k]

Backup the disk or partition in a sector-by-sector way or not, it could be decided by one of these two parameters: 0 or 1
0 - standard backup, which is the default backup option; 1 - RAW backup; This will do a RAW (pseudo forensic) sector-by-sector backup, e.g. /k 1

[/w]

Wait for the operation to complete, it could be decided by one of these two parameters: 0 or 1.
0 - not wait; 1 - wait to finish backuping, e.g. /w 1

Examples:

System Backup
1. Perform a system backup and assign a backup name
DiskMasterX.exe /b new /t system /d "d:\sys" /n "Backup System"

2. Perform a system backup with no user specified backup name
DiskMasterX.exe /b new /t system /d "d:\sys"

Disk Backup
1. Backup disk 0:
DiskMasterX.exe /b new /t disk /s 0 /d "d:\disk" /n "Backup Disk0"

2. Backup disk 0 and disk 1:
DiskMasterX.exe /b new /t disk /s "0|1" /d "d:\disk" /n "Backup two Disk"

Partition Backup
1. Backup partition E:
DiskMasterX.exe /b new /t part /s E /d "d:\part" /n "Backup Part E"

2. Backup partition disk1 partition1 and disk1 partition2:
DiskMasterX.exe /b new /t part /s "1:1|1:2" /d "d:\part" /n "Backup Parts"

File Backup
1. Backup file path E:\path
DiskMasterX.exe /b new /t file /s "E:\path\|" /d "d:\file" /n "Backup file"

2. Backup file E:\path\file and folder D:\doc:
DiskMasterX.exe /b new /t file /s "E:\path\file|D:\doc\|" /d "d:\file" /n "Backup files"

Incremental & Differential Backup
1. Incremental backup:
DiskMasterX.exe /b inc /d "d:\sys\system.fvd"

2. Differential backup:
DiskMasterX.exe /b dif /d "d:\sys\system.fvd"

3. Incremental backup with password:
DiskMasterX.exe /b inc /d "d:\sys\c-drive.fvd" /p "abc321"

Backup to Network
1. Backup to the shared network:
DiskMasterX.exe /b new /t part /s E /d "\\192.168.0.100\Share\Imgfile.fvd" /n "BackupToShare" /u "admin" /p "123456"

2. Backup to NAS
DiskMasterX.exe /b new /t part /s E /d "\\192.168.0.200\NAS\Imgfile.fvd" /n "BackupToNAS" /u "admin" /p "123456"

Compression level and split image
DiskMasterX.exe /b new /t disk /s 1 /d "d:\folder" /n "Backup Disk10" /o 2 /m 500

Sector by sector backup
DiskMasterX.exe /b new /t part /s f /d "d:\part" /n "Backup F Drive" /k 1

Encryption Backup
DiskMasterX.exe /b new /t system /d "d:\sys" /e "mypassword"

Command Line for Restore

For a backup restoration, the required parameters are:

Parameters

Description

{/r}

restore the backup of a system, disk, partition or dynamic volume, and restore the backup of files.

{/t} {system | disk | part| file}

specify restore type. "system" means to restore system backup; "disk" means to restore disk backup; "part" means to restore partition backup or dynamic volume backup; "file" means to restore file backup.

{/s}{"D:\my backup" | "\\192.168.1.1.\my backup\my backup.fvd"}

specify the path of the image file (If there is only one backup task in the directory, you can specify it as a directory).

[/v]

To restore from the latest backup version, you can specify the "/v" command in the restore operation, which will override the version corresponding to the current image file. This will restore the backup version that was taken after the current image file was created, due to the incremental or differential backup. Without the "/v" command, the backup version corresponding to the current image file will be restored.

[/i] {"0|0:0|F|path"}

The command to restore an image file to a specified source, such as a disk, partition, or dynamic volume, and destination location, such as a partition or dynamic volume, is specified using the '/i' option. For example, '/i 0' restores to disk 0, '/i 0:0' restores to partition 0 on disk 0, and '/d F' restores to partition F or dynamic volume F. If the destination is a file path, it should end with a backslash.

[/e]{"123"}

specify the password for the image file

[/d]{0|0:0|D|path}

To specify the destination location for a restore operation, use the '/d' option followed by the relevant information. For example, '/d 0' indicates that the destination is disk 0, '/d 0:0' specifies partition 0 on disk 0, '/d D' means partition D or dynamic D, and '/d path' designates a specific file path. If no '/d' option is provided, the restore will be performed to the original location.

[/f] {fill | original}

The command to resize the destination partition after a restoration, with options to either fill the entire destination partition or keep the same size as the source partition, is not available for dynamic disks.

[/a]

specify to use partition alignment to optimize for SSD.

[/u] ["admin"]

specify the user's name to access the NAS share.

[/p] ["123"]

specify the password to access the NAS share.

[/x]

To restore a system to dissimilar hardware using Acronis Universal Restore, specify it in the command line with '/t system' and '/t disk' options. This allows the system to be restored to a different hardware configuration.

[/k]

specify sector by sector restore. Only when the image file was backed up sector by sector, can it be restored using sector by sector restore

[/w] {1 | 0}

Wait for the operation to complete, it could be decided by one of these two parameters: 0 or 1.

Examples:

System Restore
1. Restore the system image named "backup.fvd" from the NAS share to its original location on the system, using partition alignment to optimize for SSD performance.
The command `DiskMasterX /r /t system /s "\\192.168.0.222\system backup\system backup.fvd" /u "admin" /p "admin" /a` can be rewritten as: "Run DiskMasterX with the following parameters: remotely restore a system backup from the server at IP address 192.168.

2. Restore the system from the image named "system backup10.fvd" to the disk 0 and perform an universal restore.
The command to run is: DiskMasterX /r /t system /s "D:\system backup\system backup10.fvd" /d 0 /x. This command is likely used to restore a system backup from a file named "system backup10.

3. Restore the system image named "system backup.fvd" to its original location and wait for the operation to complete.
DiskMasterX /r /t system /s "D:\system backup\system backup.fvd" /w 1

4. To restore the system image named "system backup.fvd" to its original location without waiting for the operation to complete, you can use the following command: `dism /image:system backup.fvd /apply-profile /wait:no`
DiskMasterX /r /t system /s "D:\system backup\system backup.fvd" /w 0

Disk Restore
Restore the disk image named "disk backup.fvd" to disk 2
The command to backup a disk to a file is: `DiskMasterX /r /t disk /s "D:\disk backup\disk backup.fvd" /i 1 /d 2`

Partition Restore
You want to restore the partition image named "my backup.fvd" to partition E, and the password for the image is "123".
The command `DiskMasterX /r /t part /s "F:\my backup.fvd" /i 1:1 /d E /e "123"` should be rewritten as follows:

File Restore
Restore the "d:\doc" folder from the image named "file backup.bzf" to "d:\path" using the password "123".
DiskMasterX /r /t file /s "file backup.bzf" /i "d:\doc\|" /d "d:\path" /e "123"

Command Line for Clone

For cloning, the required parameters are:

Parameters

Description

{/c}

clone system, disk, partition or dynamic volume.

{/t} {system | disk | part}

specify clone type. "system" means system clone; "disk" means disk clone; "part" means cloning patition or dynamic volume.

[/s] {0 | 0:0 | D}

specify the source to be cloned. No need to specify the source while performing system clone; '/s 0' means cloning disk 0; '/s 0:0' means cloning partition 0 on disk 0; '/s D' means to clone partion D or dynamic D.

{/d} {0 | 0:0 | D}

specify destination location. '/d 0' means the specified destination location is disk 0; '/d 0:0' means the specified destination location is partition 0 on disk 0; '/d D' means the specified destination location is partition D or dynamic volume D.

[/k]

specify to use Sector by sector clone.

[/a]

specify to use partition alignment to optimize for SSD.

[/f]{fill | original}

The command allows adjusting the size of the destination partition after cloning, with options to "fill" the entire destination partition or keep the same size as the source partition. This feature is not available for dynamic disks.

[/w] {1 | 0}

The operation will be completed when one of these two parameters is 0 or 1.

Examples:

System Clone
1. Clone the system to disk 0, utilizing partition alignment to optimize performance on an SSD.
DiskMasterX /c /t System /d 0 /a

2. 1. Clone the system to disk 0, and wait for the operation to complete.
DiskMasterX /c /t system /d 0 /w 1

3. Clone the system to disk 0 and do not wait for the operation to complete.
DiskMasterX /c /t system /d 0 /w 0

Disk Clone
Clone disk 1 to disk 2 and use partition alignment to optimize performance on the SSD.
DiskMasterX /c /t Disk /s 1 /d 2 /a

Partition Clone
1. Clone partition E to partition D with sector-by-sector cloning and partition alignment to optimize for SSD performance.
DiskMasterX /c /t Part /s E /d D /k /a

2. Clone partition 1 on disk 0 to patition 1 on disk 2.
DiskMasterX /c /t part /s 0:1 /d 2:1

Command for List Device

To list the devices, the required parameters are:

Parameters

Description

[/l][0]

List disks and partitions on this computer. Use /l to show ALL disks on this computer, /l 0 or /l 1 shows partitions only of disk 0 or disk 1.

[/l][/s "d:\backup.fvd"]|[/e]|[/u ]|[/p]

list disk, partition, and dynamic volume. '/s' means the path of the specified image (If there is only one backup task in the directory, you can specify it as a directory); '/u' and '/p' means the users' name and password to access the specified NAS shared path; '/e' means the password of the encrypted image.

Examples:

1. list all disks and dynamic volumes of the current system
DiskMasterX /l

2. The partitions on disk 0 of the current system are:
DiskMasterX /l 0

3. The content of the backup image named backup.fvd can be listed as follows: If the image is a system, partition, or dynamic volume backup, the partitions backed up will be shown. If the image is a disk backup, the disks backed up will be shown.
DiskMasterX /l /s "D:\backup\backup.fvd"

4. The partitions of the disk backup named "d:\disk backup\disk backup.fvd" are listed as follows: the backup task is located in the "d:\disk backup" directory. Since there is only one backup task in the directory, the partition is simply the entire directory path, which is "d:\disk backup".
DiskMasterX /l /s "d:\disk backup"

Command for Ram disk

For ram disk, the required parameters are:

Parameters

Description

{/ram}

The command `ramdisk` followed by one of the following options: `new`, `update`, `start`, `stop`, `set`, or `unset`.

{/drv}

Drive letter for ram disk, e.g. /drv Y.

[/sz]

To create a RAM disk, you can use the command `/sz `. For example, to create a 3000 MB RAM disk, you would use the command `/sz 3000`. This will allocate 3000 MB of free RAM space to the RAM disk. Note that the size of the RAM disk is specified in megabytes (MB).

[/sv]

Save ram disk's data. e.g. /sv 1.

[/systmp]

Set system temporary directory to ram disk. e.g. /systmp 1.

[/usertmp]

Set current temporary directory to ram disk. e.g. /usertmp 1.

Examples:

Create ram disk
1. Create ram disk
The command `DiskMasterX /ram new /drv Y /sz 3000 /systmp 1 /usertmp 1` is used to create a new RAM disk with specific settings. The `/ram new` option specifies that a new RAM disk is to be created, `/drv Y` indicates that the disk should be enabled, `/sz 3000` sets the disk size to 3000 bytes, and the last two options, `/systmp 1` and `/usertmp 1`, likely refer to system and user temporary file settings, respectively.

2. modify ram disk
The command `DiskMasterX /ram update /drv Y /sz 3000 /systmp 1 /usertmp 1` is used to update the RAM drive on a system. The `/ram` option specifies that the update is for the RAM drive, `/update` indicates that the update should be performed, `/drv Y` specifies that the drive should be enabled, `/sz 3000` sets the size of the drive to 3000 megabytes, `/systmp 1` sets the system temporary directory to the RAM drive, and `/usertmp 1` sets the user temporary directory to the RAM drive.

Start or Stop ram disk
1. Start ram disk
DiskMasterX /ram start

2. Stop ram disk
DiskMasterX /ram stop

Set temp path to ram disk or set temp path to default path
1. Set temp path to ram disk
DiskMasterX /ram set

2. Set temp path to default path
DiskMasterX /ram unset

Note:

  • You can't use the command line to back up data to a CD or DVD. If you want to back up data to a disc, you should use the Qiling Disk Master GUI instead.
  • When backing up dynamic volumes with no drive letters, assign a drive letter first before proceeding.
  • If your partition has no drive letter, you can use its partition number on the disk to specify it, such as using "1:2" to replace the drive letter, where you can find the numbers of disks and partitions by using the command "DiskMasterX /l".
  • The Qiling Disk Master command line program requires administrator privileges to run. If a non-administrator user attempts to run it, a window will appear prompting them to enter their administrator account credentials to complete the backup process.
  • When backing up data to a NAS, you need to specify a valid IP address, like "\\192.168.0.10\foldername", to identify the network path.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!