Using Command Line Interface in Backup Agent for Windows
The Backup Agent command line interface (CLI) has pretty the same feature set supported as the Backup Agent GUI: using CLI you can back up and restore files to/from cloud storage, edit global options, list backup plans, accounts, etc.
This chapter covers the following topics:
- Run CLI utility
- Command examples
- Silent installation
- Select edition
- Add new Managed Backup user
- Managing storage accounts
- General options
- Operations with files
- Back up NTFS permissions
- Restore files
- Delete files/folders from storage
- View file versions
Run CLI Utility
To use CLI, run a cbb.exe tool.
- Click the Windows Start button.
- Type cmd.exe in the search line to run the Windows console, then press Enter.
- Change your current folder to the folder where Backup Agent is installed. For example:
cd "C:\Program Files (x86)\CBL Company allin1\online backup\"
Command Examples
Examples show the basic usage of a command-line interface:
Set Bandwidth to 100Kb
cbb.exe option -bw 100
Back up files "C:\work\weekreport.xls" & "C:\work\month.xls" and folder "C:\Documents and Settings\scott" to myaccount with files filter
cbb.exe backup -a myaccount
-f "C:\work\weekreport.xls"
-f "C:\work\month.xls"
-d "C:\Documents and Settings\scott"
-ifm "*.doc;*.docx;*.xls"
Restore files from S3
The latest version of "C:\work\weekreport.xls" will be restored to "c:\restoredfiles" with overwriting enabled.
cbb.exe restore -a myaccount -rt latest -rl "c:\restoredfiles\" -f "C:\work\weekreport.xls" -o
Silent Installation
To perform a silent installation, use the Windows command prompt.
- Start Windows command prompt with the Run as Administrator option.
- Change the directory to the path where the Online Backup installation file is located: cd "path".
- To execute the silent installation with default settings, run the following command:
CBLCompanyallin1OnlineBackupSetup_vx.x.x.x_netv4.0_ALLEDITIONS.exe /S
If you want to install Online Backup to a specific folder type, use the /D parameter
CBLCompanyallin1OnlineBackupSetup_vx.x.x.x_netv4.0_ALLEDITIONS.exe /S /D="C:\customFolder"
To install Online Backup to a specific user profile (i.e. all settings will be saved into the user's profile, not to "All Users" as a default), use the UserName parameter:
CBLCompanyallin1OnlineBackupSetup_vx.x.x.x_netv4.0_ALLEDITIONS.exe /S /UserName
Select Edition
Each edition has its license and available trials.
Note: For users registered since August 15, 2016, there is an option to select the edition from inside the product (All-In-One)
To select a required edition use the following command:
cbb.exe option -edition editionvalue
Possible values: mssql, baremetal, msexchange, mssqlexchange, vmedition
Add New Managed Backup User Via Command Line
Change directory to the product installation folder, for example, C:\Program Files (x86)\MyCompany\Online Backup
Run the following command to set up the MBS user account:
cbb.exe addAccount -e yourUserEmail -p userPassword
(where yourUserEmail is the email of the MBS user account, and userPassword is the password.
To set up a local backup, you need to specify a File Storage account:
cbb.exe addAccount -d "DisplayName" -st FileSystem -c "Path"
where:
- -d -- any name you want to use to identify your account.
- -st -- it should be "FileSystem"
- -c -- path where you want to back up to.
- -bp -- backup prefix (a computer name by default). It is an advanced option that is used to identify a backup for a specific computer.
Managing Storage Accounts
Use the following commands to find more details:
cbb.exe account -?
List accounts (-list) List your accounts:
cbb.exe account -l
Synchronize account (-sync) Sync using the following command:
cbb.exe account -s (-sync) "accountname"
Custom folders (-custom) Folders that must be considered while syncing:
cbb.exe account -customfolders "folder path"
Output format Set the format of the output
cbb.exe account -output
Possible formats: short, full(Default) For the help use:
cbb.exe account -?(\?, help, man)
Edit account
Enter the following commands:
cbb.exe [-e email] [-p password] [-bp backupPrefix] [-ssl [yes | no]] -e email: Specify user email -p password: Specify a password for the user -bp backupPrefix: Backup prefix to differentiate between backups from different computers. Optional, by default is the computer name -**ssl **[yes | no]: Use SSL
General options
Use the following command to get help on it:
cbb.exe option -?
Operations with Files
Backup files (backup) Use the following command to find more details:
cbb.exe backup -?
Command Arguments
Argument | Description | Value |
---|---|---|
-a(ccount) | Account name | - |
-aid | Account ID | - |
-f(ile) | Backup file | - |
-d(irectory) | Backup directory | - |
-ifm | Include file mask | - |
-efm | Exclude file mask | - |
-es | Except system and hidden files | yes(default), no |
-skipf | Skip folders. Example: “bin; temp” | - |
-c | Compress files | yes,no(default) |
-ea | Encryption algorithm | no,AES128-256 |
-ep | Encryption password | - |
-bef Backup empty folders | yes,no(default) | |
-s(imple) | Use simple mode | yes,no(default) |
-oa(onlyafter) | Backup files only after specified date/time | - |
-vss | Force using VSS (Volume Shadow Copy Service) | yes, no(default) |
-ntfs | Backup NTFS permissions | yes, no(default) |
-sharerw | Use share read/write mode on errors. Can help if file is open in share read/write mode | yes, no(default) |
Back Up NTFS Permissions
Enable NTFS permission backup if required.
To apply this feature for a new backup simply enter the following command:
cbb.exe backup -ntfs
To restore NTFS permissions enter the following command:
cbb.exe restore -ntfs
Import backup configuration
Import backup configuration Use the following command to import backup configuration fles:
importConfig -f filePath [-m]
The list of available parameters:
- -? -- Display the command's help
- -f : specify the path to the configuration file
- -m : indication to replace the backup prefix in the imported accounts with the current machine's name
Restore Files
Use the following command to find more details:
cbb.exe restore -?
Command Arguments
Argument | Description | Value |
---|---|---|
-a(ccount) | Account name | - |
-f(ile) | Restore file | - |
-d(irectory) | Restore directory | - |
-rl | Restore location | original (default), "path" |
-rt | Restore type | latest (default), Date time |
-o(verwrite) | Overwrite existing files | - |
-ep | Encryption password | - |
-bp | Backup prefix | - |
-rn (-restorenew) | Restore only new files. Existing files will be overwritten only if the modification date of the backed up file is newer than the existing | - |
Delete Files/folders From Storage
Use the following command to find more details:
cbb.exe delete -?
Command Arguments
Argument | Description | Value |
---|---|---|
-a(ccount) | Account name | - |
-f(ile) | Restore file | - |
-d(irectory) | Restore directory | - |
View File Versions
Use the following command to find more details:
cbb.exe list -?
Command Arguments
Argument | Description | Value |
---|---|---|
-a(ccount) | Account name | - |
-f(ile) | Restore file | - |
-d(irectory) | Restore directory | - |