CloudBerry Backup command line interface allows to backup and restore files from cloud storage, edit global options, list backup plans and account, etc. Command line interface can be used for integrating backup process into production environment.

CloudBerry Backup command line interface is implemented by a little tool called cbb.exe.

To try it out run windows console cmd.exe. Make sure you change your current folder to CloudBerry Backup product installation folder by default at C:\Program Files\CloudBerryLab\CloudBerry Backup Server Edition\ (or for Desktop Edition is C:\Program Files\CloudBerryLab\CloudBerry Onilne Backup\)

Example shows basic usage of command line interface:

Example 1:

Set bandwidth to 100Kb

cbb.exe -o -bw 100

Example 2:

Backup 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"

Example 3:

Restore files from S3

Latest version of "C:\work\weekreport.xls" will be restored to "c:\restoredfiles\" with overwrite.

cbb.exe restore -a myaccount -rt latest -rl "c:\restoredfiles\" -f "C:\work\weekreport.xls" -o

How to Activate CloudBerry Backup using Command Line

To perform actions listed in this paragraph you need to start the command line interface:

1. Click on the Windows "Start" button.

2. Type cmd.exe in the search line to run the Windows console, press "Enter".

3. Change your current folder to the folder where CloudBerry Backup has been installed, for example:

cd "C:\Program Files\CloudBerryLab\CloudBerry Backup Server Edition"

Online Activation or Request Trial

1. Activate license. (Email & key are required):

cbb activatelicense -e "email" -k "license_key" -or

(where "email" is your personal email and "license_key" is your license key that you received when buying the product).

2. Request trial license. (Email & key are required):

cbb activatelicense -e "email" -t

Offline Activation

If you don't have an ability to activate CloudBerry Backup online you can use offline activation.

1. Generate offline license request using your email and license key:

cbb activatelicense -e "email" -k "license_key" -or

(where "email" is your personal email and "license_key" is your license key that you received when buying the product).

As an output you will get a service key.

2. Send the service key to contact@cloudberrylab.com. You will receive the activation key by email.

3. Activate license key

cbb activatelicense -e "email" -k "license_key" -oa "activationkey_received"

For time limited license you need to specify -expire parameter with the date you received by email:

cbb activatelicense -e "email" -k "license_key" -oa "activationkey_received" -expire "YYYY-MM-DD"

4. The product is activated.

Moving repository file (CBBackup.db) to alternative location

By default the repository file location is a user profile folder. To move the repository file (CBBackup.db), run the following command:

cbb.exe option -databaseLocation path

where "path" is a new repository file destination. As a result, the CBBackup.db file will be moved to the new location.

Note: Make sure CloudBerry Backup is not open and there are no running backup plans before moving.

Switching to All Users mode

With CloudBerry Backup v2.5 you can switch backup settings from current user profile to the "All Users" profile so that your current settings become available for other users on the computer.

By default the current user profile is used as a settings location. To switch to the "All Users" mode, run the following command:

cbb.exe option -userMode common

As a result, all user settings will be saved in the "all users" profile (C:\ProgramData on Windows 7, 2008 or Vista; C:\Documents and Settings\All Users on Windows XP, 2003) and will be used for any user working with CloudBerry Backup including the current one.

To change the settings mode back to current user, run the following command:

cbb.exe option -userMode current

Note: All settings from "All Users" profile will be moved to the current user profile and since then personal user profile will be used as the settings location.

Setting global options (option):

Use the following command to find more details:

cbb.exe option ?

Parameter Description Value
-userMode Change user mode. By default 'current' mode is used. Each user configures its own plans and settings. If common mode is selected all users of the computer configure the same plans and settings. common, current
-databaseLocation Change database location. By default database is located in user profile. Database will be moved to specified directory for saving space on system drive or other reasons.  
-mssqlTempLocation Change local temporary folder for SQL Server backups. By default backups are located in user profile. Temporary MSSQL backup storage can be moved to specified directory for saving space on system drive or other reasons.  
-bw(andwidth) Change bandwidth Unlimited(u), 1-100000
-proxy Proxy type no, auto, manual
-pa Proxy address  
-pp Proxy port  
-pt Proxy authentication yes,no
-pu Proxy user  
-pd Proxy domain  
-ps Proxy password  
-cs Chunk size in KBs 1-1048576
-t(-threads) Upload threads count 1-99
-purge Purge versions that are older than specified period no, 1d(w,m,y) where d=days, w=weeks, m=months, y =years; 1-400
-keep Keep number of versions all, 1-100
-hp Purge history no, 1d(w,m,y) where d=days, w=weeks, m=months, y =years; 1-400
-hk Keep number of records in history all, 1-100
-l(ogging) Logging level no,l(ow),h(igh),d(ebug)

Setting backup options (backup):

Use the following command to find more details:

cbb.exe backup ?

Parameter 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
-c Compress files yes,no(default)
-ea Encryption algorithm no,aes128,des64,rc240,3des112,...
-ep Encryption password  
-rrs Use reduced redundancy storage 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)
-sharerw Use share read/write mode on errors. Can help if file is open in share read/write mode yes, no(default)

Setting restore options (restore):

Use the following command to find more details:

cbb.exe restore ?

Parameter 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 modification date of backuped file is newer than existing  

Delete files/folders from cloud (delete):

Use the following command to find more details:

cbb.exe delete ?

Parameter Description Value
-a(ccount) Account name  
-f(ile) Restore file  
-d(irectory) Restore directory  

View files versions (list):

Use the following command to find more details:

cbb.exe list ?

Parameter Description Value
-a(ccount) Account name  
-f(ile) Restore file  
-d(irectory) Restore directory  

Plans listing (plan -l):

Lists all available plans (name and id):

cbb.exe plan -l

Accounts listing (account -l):

Lists all available accounts:

cbb.exe account -l

Synchronize account (account -s):

Sync local database with a cloud storage:

cbb.exe account -s "accountname"

Managing Accounts

Create account (addAccount):

Use the following command to find more details:

cbb.exe addAccount ?

Parameter Description Value
-d Display name  
-st storageType: Type of storage account AmazonS3, Azure, FileSystem, Google, Scality, Dunkel, Tiscali, HostEurope, DreamObjects, Seeweb, Connectria, Walrus, Mezeo, OpenStack, Rackspace, Clodo, HPCloud, HaylixCloud, GreenQloud
-as [authService] : Authentication Service. Used only for OpenStack storage. yes, no(default)
-at [accountType] : Account Type UK, US
-ac Access key or 'account' (Azure), or 'Query ID' (Walrus). Not used for File Storage  
-sk Secret key or 'Shared key' (Azure). Not for File Storage  
-sp Service point (optional). Not used for Amazon S3, Azure, File System, Google  
-c Bucket or Container (Azure) or Path (file storage). Must exist yes, no (default)
-bp Bucket prefix (optional) Computer name (default)
-ssl Use SSL yes, no (default)

Edit account (editAccount):

Use the following command to find more details:

cbb.exe editAccount ?

Rename account:

cbb.exe editAccount -d "my" -n "join"

Delete account (deleteAccount):

cbb.exe deleteAccount accountName [, accountName]

Managing Backup Plans

Create backup plan (addBackupPlan):

Use the following command to find more details:

cbb.exe addBackupPlan ?

Parameter Description Value
-n(ame) Plan name  
-a(ccount) Account name  
-aid Account ID  
-f(ile) Backup file  
-d(irectory) Backup directory  
-s(imple) Use simple mode yes, no (default)
-ifm Include file mask  
-efm Exclude file mask  
-es Except system and hidden files yes(default),no
-c Compress files yes,no(default)
-ea Encryption algorithm no,aes128,des64,rc240,3des112,...
-ep Encryption password  
-rrs Use reduced redundancy storage yes,no(default)
-oa(onlyafter) Backup files only after specified date/time  
-every Recurring schedule type day, week, month, dayofmonth
-at Specific datetime of time of schedule "datetime" or "time"
-day Specific day for "dayofmonth" schedule 1..31
-weekday Days of week for "weekly" schedule List of weel days (e.g. "su,mo,tu,we,th,fr,sa")
-weeknumber Number of week for monthly schedule first,second,third,fourth,penultimate,last
-r Run backup plan now  
-vss Force using VSS (Volume Shadow Copy Service) 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)
-skipf Skip folders Example: -skipfolder "bin;*temp*;My*"
-df Delete files that have been deleted locally after specified number of days days
-preAction Specify command to be executed before backup completes command
-pac Specify to continue backup plan if pre-backup action failed yes, no
-postAction Specify command to be executed after backup has been successfully completed command
-paa Specify to execute post-backup action in any case (regardless the backup result) yes, no
-notification Specify to recieve notification email when backup fails (errorOnly) or in all cases (on) errorOnly, on, off
-dr Specify to generate detailed report yes, no
-winLog Specify to add entry to Windows Event Log when backup fails (errorOnly) or in all cases (on) errorOnly, on off
-sp Save backup plan configuration to the backup storage yes(default), no

How to define specific schedules:

Specific date:

-at "datetime"

Recurring daily:

-every day -at "time"

Recurring weekly:

-every week -weekday "sa,su" -at "time"

Recurring monthly:

-every month -weeknumber first -weekday "su" -at "time"

Recurring day of month:

-every dayofmonth 7 -at "time"

Edit backup plan (editBackupPlan)

Use the following command to find more details:

cbb.exe editBackupPlan ?

Renaming a backup plan:

cbb.exe editBackupPlan -n "Documents" -nn "Work Documents"

Disabling a schedule:

cbb.exe editBackupPlan -n "Work Documents" -sd

Run backup plan (editBackupPlan -r)

cbb.exe editBackupPlan -n "Work Documents" -r

Delete backup plan (deleteBackupPlan)

cbb.exe deleteBackupPlan -n "Work Documents"

View backup plan settings (getBackupPlanDetails)

cbb.exe getBackupPlanDetails -n "Work Documents"

or

cbb.exe getBackupPlanDetails -id planID

Notification Settings (notificationSetting)

Email address to receive notification email when backup completes

cbb.exe notificationSetting -email your@email

where -username is optional.

Name of user (optional)

cbb.exe notificationSetting -username nameofuser

Specify to use own SMTP server for email notifications

cbb.exe notificationSetting -usesmtp yes/no

Specify SMTP Server address

cbb.exe notificationSetting -server serveraddress

Specify SMTP Server port

cbb.exe notificationSetting -port serverport

Specify Email From

cbb.exe notificationSetting -emailfrom from@email

Use SSL

cbb.exe notificationSetting -usessl

SMTP requires authentication

cbb.exe notificationSetting -smtpauth yes/no

Specify SMTP user name if SMTP Server requires authentication

cbb.exe notificationSetting -smtpUser username

Specify password if SMTP Server requires authentication

cbb.exe notificationSetting -smtppassword password

Start plan (legacy*):

"CBBackupPlan.exe"<plan id="">

<plan id=""> can be determined using: cbb.exe plan -l (command will list all backup plans) *Left for backward compatibility. Not recommended, use cbb.exe editBackupPlan -r instead.

License command:

Activate license (activateLicense)

Use the following command to find more details:

cbb.exe activateLicense ?

Parameter Description Value
-e(mail) Email for license activation  
-k(ey) License Key  
-t(rial) Request trial  

Show license (showLicense):

cbb.exe showLicense

Release license (releaseLicense):

cbb.exe releaseLicense

Send log (sendLog):

Use the following command to find more details:

Send log (sendLog):

cbb.exe sendLog ?

Parameter Description Value
-u Name (optional)  
-e Email  
-m Description of the issue  

Upgrading to a new version (checkNewVersion):

Use the following command to find more details:

cbb.exe checkNewVersion ?

Automatically upgrade to a new version:

cbb.exe checkNewVersion -i

Integrated help usage:

General Command help:

cbb.exe or cbb.exe -?

Command help:

cbb.exe command ?

Shrink repository database (database):

Use the following command to shrink repository database:

cbb.exe database -shrink

Product Updates

Subscribe

CloudBerry Lab respects your privacy. We don't rent or sell your personal information to anyone. Ever.

Advanced Technology Partner