Create Command Line Backup to Protect Your Computer  

Command Line Backup, Clone and Ram disk


For more advanced use Qiling Disk Master can be controlled from the Command Line, instead of using the Windows interface.

Command Line Syntax

1. Run the command line prompt as administrator. To open the Command prompt, either:
a) Click Start, right click Command Prompt and select "Run as Administrator"
Or
b) Press WIN+R to open "Run" window and type "cmd" to open it.

2. Navigate to the of Qiling Disk Master installation directory by typing in:
cd C:\Program Files\Qiling\Disk Master. If you installed the program in a different location, enter that location instead
This means open the path--“C:\Program Files\Qiling\Disk Master” which is the installation directory of Qiling Disk Master of your version. Note: the path must match the installation directory of the program you 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:
For a disk backup specify the number of the disk, e.g. /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, e.g. /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}

Specify the type of backup, it could be one of the following: inc, dif 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"
This means creating an incremental or a differential backup based on image--"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]

Password; if you backup to a network and a password is required to access the network; e.g. /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]

specify to use the latest backup version to restore(because of incremental or diferential backup). The backup version corresponding to the current image file will be restored without this "/v" command.

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

specify the source, which means the disk, partition or dynamic volume to be restored in the image file. '/i 0' means disk 0 or dynamic volume 0; '/i 0:0' means partition 0 on disk 0; '/d F' means the destination location is partition F or dynamic F; '/i path' means file path for file restore (The last character of the directory path must be "\"); no '/i' means no need to specify the partition to be restored while performing system restore.

[/e]{"123"}

specify the password for the image file

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

specify the destination location to restore to. '/d 0' means destination location is disk 0; '/d 0:0' means the destination location is partition 0 on disk 0; '/d D' means the destination location is partition D or dynamic D; '/d path' means the destination location is file path; no '/d' means restore to the original location.

[/f] {fill | original}

adjust the size of the destination partition. "fill" means to fill the entire destination partition after restoration; "original" means to keep the same size as the source partition after restoration. This command 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]

specify universal restore to restore system to dissimilar hardware. It has to be used with '/t system' and '/t disk'.

[/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" on NAS share to the original location using partition alignment to optimize for SSD
DiskMasterX /r /t system /s "\\192.168.0.222\system backup\system backup.fvd" /u "admin" /p "admin" /a

2. Restore the system from the image named "system backup10.fvd" to the disk 0 and perform an universal restore.
DiskMasterX /r /t system /s "D:\system backup\system backup10.fvd" /d 0 /x

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

4. Restore the system image named "system backup.fvd" to the original location, and don't wait for the operation to complete.
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
DiskMasterX /r /t disk /s "D:\disk backup\disk backup.fvd" /i 1 /d 2

Partition Restore
Restore the partition image named "my backup.fvd" to partition E, and the password for the image is "123".
DiskMasterX /r /t part /s "F:\my backup.fvd" /i 1:1 /d E /e "123"

File Restore
Restore the folder "d:\doc" in the image named "file backup.bzf" to "d:\path", and the password for the image is "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}

adjust the size of the destination partition. "fill" means to fill the entire destination partition after cloning; "original" means to keep the same size as the source partition after cloning. This command is not available for dynamic disks.

[/w] {1 | 0}

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

Examples:

System Clone
1. Clone system to disk 0 and using partition alignment to optimize for SSD
DiskMasterX /c /t System /d 0 /a

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

3. Clone system to disk 0, and don't wait for the operation to complete.
DiskMasterX /c /t system /d 0 /w 0

Disk Clone
Clone disk 1 to disk 2 and using partition alignment to optimize for SSD
DiskMasterX /c /t Disk /s 1 /d 2 /a

Partition Clone
1. Clone partition E to partition D and using partition alignment to optimize for SSD as well as Sector by sector clone
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. list all the partitions on disk 0 of the current system
DiskMasterX /l 0

3. list the content of the backup image named backup.fvd. If the image is a system, partition or dynamic volume backup,the partition(s) backed up will be displayed; if the image is a disk backup, the disk(s) backed up will be displayed.
DiskMasterX /l /s "D:\backup\backup.fvd"

4. list all the partitions of the disk backup named "d:\disk backup\disk backup.fvd", there is only one backup task in the directory.
DiskMasterX /l /s "d:\disk backup"

Command for Ram disk

For ram disk, the required parameters are:

Parameters

Description

{/ram}

Specify the type of ram disk, it could be one of the following: new, update, start, stop, set or unset.

{/drv}

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

[/sz]

Specify size(MB) to ram disk. e.g. /sz 3000 (Free RAM space).

[/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
DiskMasterX /ram new /drv Y /sz 3000 /systmp 1 /usertmp 1

2. modify ram disk
DiskMasterX /ram update /drv Y /sz 3000 /systmp 1 /usertmp 1

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 cannot back up data to disc (CD/DVD) by using the command line. If you want to back up data to disc, please use Qiling Disk Master GUI.
  • When you back up the dynamic volume(s) with no drive letter(s), then you need to assign drive letter first.
  • If your partition has no drive letter, you can use its partition number on the disk to specify it. For example, the partition is the second on the first disk, then you can use “1:2” to replace the drive letter. You can find the numbers of disks and partitions byusing the command “DiskMasterX /l”.
  • The Qiling Disk Master command line program must be run with administrator privileges. If you are a non-administrator user, a window will pop up in which you need to enter the correct account information to finish the backup process.
  • When you back up data to a NAS, you must provide a valid IP address, such as "\\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!