Installation and Login
Installation and Login

Create Command Line Backup to Protect Your Computer

AOMEI Post By AOMEI Updated November 23, 2021

For more advanced use AOMEI Backupper 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 AOMEI Backupper installation directory by typing in:
cd C:\Program Files\AOMEI Backupper. If you installed the program in a different location, enter that location instead
This means open the path--“C:\Program Files\AOMEI Backupper” which is the installation directory of AOMEI Backupper 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:
AMBackup.exe /b new /t disk /s 0 /d "d:\disk" /n "Backup Disk0"
This commands AMBackup.exeto start a new disk backup and backup disk 0, next save the backup file to “D:\disk backup” and name the backup file as “Backup Disk0”

Syntax:

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

Show Help

Input

AMBackup /?

Type “AMbackup /?” in Comand prompt to look for help

Output

AMBackup { /b | /c | /r | /l | /? }

-"AMBackup" has five functions, which are backup(/b), clone(/c), restore(/r), list(/l), and help(/?)

AMBackup /l /?

-display the complete usage of the list command

AMBackup /b /?

-display the complete usage of the backup command

AMBackup /c /?

-display the complete usage of the clone command

AMBackup /r /?

-display the complete usage of the restore 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

newcreate a new backup task

{/t}

Specify the type of source, it could be one of the following: system, disk or part

systemmeans to backup your systemdiskmeans to backup diskspartmeans to backup partitions

{/s}

Specifies the source for the backup:
For a disk backup specify the number of the disk, e.g. /s 0.
For a partition backup, specify the drive letter, e.g. /s C.
For partitions without a drive letter, specify the partition number, e.g. /s 0:1

{/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

inccreate an incremental backup based on the last backupdifcreate a differential backup based on the last full backupfullcreate a subsequent full backup

{/s}

Specify the main file for creating incremental or differential backups from, e.g. "/s d:\backup\ab.adi"
This means creating an incremental or a differential backup based on image--"d:\backup\ab.adi"

The following are some optional parameters:

Parameters

Description

[/n]

Assign a name for the backup to distinguish it from others

[/c]

The compression level of the image file could be one of the following: 0, 1 or 2

0no compression1fast standard compression2higher 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.

[/r]

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

0means standard backup, which is the default backup option.1Raw backup; This will do a raw (pseudo forensic) sector-by-sector backup, e.g. /r 1

List the disk and partitions:

Parameters

Description

[/l]

List disks and partitions on this computer. Use /l to show ALL disks on this computer, /l0 or /l1 shows partitions only of disk 0 or disk 1. (Note: there is no space between the "/l" and "0")

Examples:

System Backup

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

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

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

2. Backup disk 0 and 1:
AMBackup.exe /b new /t disk /s 0 /s 1 /d "d:\disk" /n "Backup Two Disks"
 
Partition Backup

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

2. Backup partition E, F and G:
AMBackup.exe /b new /t part /s E /s F /s G /d "d:\part" /n "Backup Parts"
 
Incremental & Differential Backup

1. Incremental backup:
AMBackup.exe /b inc /s "d:\sys\system.adi"

2. Differential backup:
AMBackup.exe /b dif /s "d:\sys\system.adi"

3. Incremental backup with password:
AMBackup.exe /b inc /s "d:\sys\c-drive.adi" /p "abc321"
 
Backup to Network

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

2. Backup to NAS
AMBackup.exe /b new /t part /s E /d "\\192.168.0.200\NAS\Imgfile.adi" /n "BackupToNAS" /u "admin" /p "123456"
 
Compression level and split image

AMBackup.exe /b new /t disk /s 10 /d "z:\folder" /n "Backup Disk10" /c 2 /m 500
 
Sector by sector backup

AMBackup.exe /b new /t part /s f /d "d:\part" /n "Backup F Drive" /r 1
 
Encryption Backup

AMBackup.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.

{/t} {system | disk | part}

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.

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

specify the path of the image file.

[/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}|[null]

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; "null" 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}|[null]

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; "null" means not to use "/d", and 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

[/o] {yes | no}

switch off the interactive prompt."yes" means to execute automatically the next operation when interactive operation is needed; "no" means to cancel the operation when interactive operation is needed. By default, the program will wait for user's confirmation.

Examples:

System Restore

1. Restore the system image named "backup.adi" on NAS share to the original location using partition alignment to optimize for SSD
AMBackup /r /t system /s "\\192.168.0.222\system backup\system backup.adi" /u "admin" /p "admin" /a

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

3. Restore the system image named "system backup.adi" to the original location, and neglect interactive prompt.
AMBackup /r /t system /s "D:\system backup\system backup.adi" /o yes

4. Restore the system image named "system backup.adi" to the original location, and terminate the operation when an interactive prompt occurs.
AMBackup /r /t system /s "D:\system backup\system backup.adi" /o no
 
Disk Restore

Restore the disk image named "disk backup.adi" to disk 2
AMBackup /r /t disk /s “D:\disk backup\disk backup.adi” /i 1 /d 2
 
Partition Restore

Restore the partition image named "my backup.adi" to partition E, and the password for the image is"123".
AMBackup /r /t part /s "F:\my backup.adi" /i 1:1 /d E /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.

[/o] {yes | no}

switch off the interactive prompt."yes" means to execute automatically the next operation when an interactive operation is needed; "no" means to cancel the operation when an interactive operation is needed. By default, the program will wait for user's confirmation.

Examples:

System Clone

1. Clone system to partition D and using partition alignment to optimize for SSD
AMBackup /c /t System /d D /a

2. Clone system to patition 1 on disk 2
AMBackup /c /t System /d 2:1

3. Clone system to partition D in use, and neglect interactive prompt to complete the operation.
AMBackup /c /t system /d D /o yes

4. Clone system to E partition in use, and terminate the operation when an interactive prompt occurs.
AMBackup /c /t system /d E /o no
 
Disk Clone

Clone disk 1 to disk 2 and using partition alignment to optimize for SSD
AMBackup /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
AMBackup /c /t Part /s E /d D /k /a

2. Clone partition 1 on disk 0 to patition 1 on disk 2, and assign the new partition a drive letter as X
AMBackup /c /t part /s 0:1 /d 2:1 /l X
 

Command for List Device

To list the devices, the required parameters are:

Parameters

Description

[/l][0]|[/s D:\backup.adi]|[1 /s
D:\disk-backup.adi]|[/e]|[/u ] |[/p]|[null]

list disk, partition, and dynamic volume."/s" means the path of the specified image; "/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
AMBackup /l

2. list all the partitions on disk 0 of the current system
AMBackup /l 0

3. list the content of the backup image named backup.adi. 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.
AMBackup /l /s D:\backup\backup.adi

4. list all the partitions on disk 0 of the disk backup named disk backup.adi

AMBackup /l 0 /s D:\disk backup\disk backup.adi

Notes:

  • 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 AOMEI Backupper 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 “AMBACCKUP /L”.

  • The AOMEI Backupper 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.

  • The command line implementation of AOMEI does not support file level backup operations.