Learn how to use the command line to do backups, restore, and clone with CBackup. The backup feature will be more convenient for batch files and batch commands.
For more advanced use, CBackup can be controlled from the Command Line, instead of using the Windows interface.
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 the "Run" window and type "cmd" to open it.
2. Navigate to the CBackup installation directory by typing in:
cd C:\Program Files\CBackup. If you installed the program in a different location, enter that location instead
This means open the path--"C:\Program Files\CBackup" which is the installation directory of CBackup 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 Command 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 |
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 system means to backup your system disk, means to backup diskspart means to backup partitions |
|
{/s} |
Specifies the source for the backup: |
|
{/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 Create an incremental backup based on the last backup. Create a differential backup based on the last full backup. Create a subsequent full backup |
|
{/s} |
Specify the main file for creating incremental or differential backups from, e.g. "/s 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 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. |
|
[/r] |
Back up 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 means 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") |
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 an incremental or differential 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 the 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 the 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 is 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 an interactive operation is needed; "no" means to cancel the operation when an interactive operation is needed. By default, the program will wait for the user's confirmation. |
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 partition 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 partition 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 the 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. |
To list the devices, the required parameters are:
|
Parameters |
Description |
|
[/l][0]|[/s D:\backup.adi]|[1 /s |
list disk, partition, and dynamic volume."/s" means the path of the specified image; "/u" and "/p" mean the users' name and password to access the specified NAS shared path;"/e" means the password of the encrypted image. |
AMBackup /l 0 /s D:\disk backup\disk backup.adi
Notes:
You cannot back up data to a disc (CD/DVD) by using the command line. If you want to back up data to a disc, please use CBackup GUI.
When you back up the dynamic volume(s) with no drive letter(s), then you need to assign a 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 number of disks and partitions by using the command “AMBACCKUP /L”.
The CBackup 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 CBackup does not support file-level backup operations.