Resources
CloudBerry Backup Command Line Interface

CloudBerry Backup Command Line Interface

CloudBerry Backup command line interface allows to back up and restore files to/from cloud storage, edit global options, list backup plans and accounts, 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 command line console - cmd.exe. Make sure you change your current folder to CloudBerry Backup product installation folder (C:\Program Files\CloudBerryLab\CloudBerry Backup\):

  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"

Examples show 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

Silent Installation

To perform a silent install you have to use Windows command line.

  1. Start Windows command line on the computer with "Run as Administrator" option.
  2. Change directory to the path where CloudBerry Backup installation file is located: cd "path"
  3. Type CloudBerryOnlineBackupSetup_vx.x.x.xALLEDITIONSnetv4.0.exe /S to start silent install with default settings.Note: where "x.x.x.x" is a version of CloudBerry Backup.
    backup-cmd

    If you want to install CloudBerry Backup to a specific folder type:

    CloudBerryOnlineBackupSetup_vx.x.x.xALLEDITIONSnetv4.0.exe /S /D="C:\customFolder"

Activating CloudBerry Backup

Activate product or request trial

  1. Activate a commercial license (Email, key are required):cbb activatelicense -e "email" -k "license_key"(where "email" is your personal email, "license_key" is your license key that you received when buying the product).
  2. Request trial license for a certain edition (Email, edition are required):cbb activatelicense -e "email" -edition "ultimate" -t(where -edition can be desktop, server, mssql, msexchange, ultimate)

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; -or stands for "offline request").As an output you will get a service key.
  2. Send the service key to support@cloudberrylab.com. You will receive the activation key and the license creation date by email.
  3. Activate license keycbb activatelicense -e "email" -k "license_key" -oa "activationkey_received"Note: 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"

You can also request trial using offline:

cbb activatelicense -e "email" -edition "ultimate" -t -orAs an output you will get a service key. Then run the command:

cbb activatelicense -e "email" -edition "ultimate" -oa "activationkey_received"

License commands (activatelicense)

Use the following command to find more details:

cbb.exe activateLicense ?

ParameterDescriptionValue
-e(mail)Email for license activation
-k(ey)License Key
-t(rial)Request trial
-editionProduct edition (required for requesting trial)desktop, server, mssql, msexchange, ultimate
-orOffline request for getting activation key
-oaOffline activation request

Show license (showLicense):

cbb.exe showLicenseRelease license (releaseLicense):

cbb.exe releaseLicense

Managing Accounts

Create account (addAccount)

Use the following command to find more details:

cbb.exe addAccount ?

ParameterDescriptionValue
-dDisplay name
-ststorageType: Type of storage accountAmazonS3, Azure, FileSystem, Google, Glacier, S3Compatible, Scality, Dunkel, Tiscali, HostEurope, DreamObjects, Seeweb, Connectria, Walrus, OpenStack, Rackspace, Clodo, HPCloud, HPHelion, IDCFrontier, GreenQloud
-as[authService] : Authentication Service. Used only for OpenStack storage.yes, no(default)
-at[accountType] : Account Type. Used only for Rackspace storage.UK, US
-acAccess key or 'account' (Azure), or 'Query ID' (Walrus) or ‘User Name’ for OpenStack, Rackspace, Clodo, HPCloud. Not used for File Storage
-skSecret key or 'Shared key' (Azure), or ‘Api key’ (OpenStack). Not for File Storage
-spService point (optional). Not used for Amazon S3, Azure, File System, Google, OpenStack, Rackspace, Clodo, HPCloud.
-cBucket or Container (Azure, OpenStack, Rackspace, Clodo, HPCloud) or Path (file storage). Must exist.
-bpBucket prefix (optional)Computer name (default)
-sslUse SSLyes, no (default)

Edit account (editAccount)

You can rename account, edit storage credentials, change bucket/container or backup prefix, manage SSL option.

Rename account:

cbb.exe editAccount -d "my" -n "join"Edit storage credentials (e.g. for Amazon S3):

cbb.exe editAccount -d "my" -ac "newAccessKey" -sk "newSecretKey"(where "newAccessKey" and "newSercetKey" are new access and secret Amazon S3 keys accordingly)

Use the following command to find more details:

cbb.exe editAccount ?

Delete account (deleteAccount)

cbb.exe deleteAccount accountName [, accountName]

List accounts (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"Sync local database with a cloud storage if the “encrypt filenames” option was used for backup:

cbb.exe account -s "accountname" -syncpassword "password"Sync local database with a cloud storage for “custom mode” backups:

cbb.exe account -s "accountname" -customfolders "foldername"

Operations with Files

Backup files (backup)

Use the following command to find more details:

cbb.exe backup ?

ParameterDescriptionValue
-a(ccount)Account name
-aidAccount ID
-f(ile)Backup file
-d(irectory)Backup directory
-ifmInclude file mask
-efmExclude file mask
-esExcept system and hidden filesyes(default),no
-skipfSkip folders. Example: “bin;*temp*”
-cCompress filesyes,no(default)
-eaEncryption algorithmno,aes128,des64,rc240,3des112,..
-epEncryption password
-befBackup empty foldersyes,no(default)
-rrsUse reduced redundancy storage (for Amazon S3 only)yes,no(default)
-sseUse server-side encryption (for Amazon S3 only)yes,no(default)
-siaUse Standard-Infrequent Access (for Amazon S3 only)yes,no(default)
-s(imple)Use simple modeyes,no(default)
-oa(onlyafter)Backup files only after specified date/time
-vssForce using VSS (Volume Shadow Copy Service)yes, no(default)
-sharerwUse share read/write mode on errors. Can help if file is open in share read/write modeyes, no(default)

Restore files (restore)

Use the following command to find more details:

cbb.exe restore ?

ParameterDescriptionValue
-a(ccount)Account name
-f(ile)Restore file
-d(irectory)Restore directory
-rlRestore locationoriginal (default), "path"
-rtRestore typelatest (default), Date time
-o(verwrite)Overwrite existing files
-epEncryption password
-bpBackup 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 ?

ParameterDescriptionValue
-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 ?

ParameterDescriptionValue
-a(ccount)Account name
-f(ile)Restore file
-d(irectory)Restore directory

Managing Plans

File-level plans

Create backup plan (addBackupPlan)

Use the following command to find more details:

cbb.exe addBackupPlan ?

ParameterDescriptionValue
-n(ame)Plan name
-a(ccount)Account name
-aidAccount ID
-f(ile)Backup file
-d(irectory)Backup directory
-s(imple)Use simple modeyes, no (default)
-customUse custom mode. Custom path should be specified.
-ifmInclude file mask
-efmExclude file mask
-esExcept system and hidden filesyes(default), no
-befBackup empty foldersyes, no(default)
-eaEncryption algorithmNo, aes128,des64,rc240,3des112,...
-epEncryption password
-rrsUse reduced redundancy storage (for Amazon S3 only)yes, no(default)
-sseUse server-side encryption (for Amazon S3 only)yes, no(default)
-siaUse Standard-Infrequent Access (for Amazon S3 only)yes, no(default)
-oa(onlyafter)Backup files only after specified date/time
-purgePurge versions that are older than a period (except the lastest version)
-keepKeep limited number of versionsall, “number”
-keepLastVersionAlways keep the last version.yes, no
-delayPurgeSpecify purge delay.No, 1d(w,m)
-vssForce using VSS (Volume Shadow Copy Service)yes, no(default)
-sharerwUse share read/write mode on errors. Can help if file is open in share read/write modeyes, no(default)
-skipfSkip foldersExample: -skipfolder "bin;*temp*;My*"
-dfDelete files that have been deleted locally after specified number of daysdays
-preActionSpecify command to be executed before backup completescommand
-pacSpecify to continue backup plan if pre-backup action failedyes, no
-postActionSpecify command to be executed after backup has been successfully completedcommand
-paaSpecify to execute post-backup action in any case (regardless the backup result)yes, no
-notificationSpecify to receive notification email when backup fails (errorOnly) or in all cases (on)errorOnly, on, off
-drSpecify to generate detailed reportyes, no
-winLogSpecify to add entry to Windows Event Log when backup fails (errorOnly) or in all cases (on)errorOnly, on off
-spSave backup plan configuration to the backup storageyes(default), no
-cloneplanClone existing plan. Plan name should be specified.
Schedule Options
-everyRecurring schedule typeday, week, month, dayofmonth, real-time
-atSpecific datetime of time of schedule"datetime" or "time"
-daySpecific day for "dayofmonth" schedule1..31
-weekdayDays of week for "weekly" scheduleList of weekdays (e.g. "su,mo,tu,we,th,fr,sa")
-weeknumberNumber of week for monthly schedulefirst,second,third,fourth,penultimate,last
dailyFromSpecify daily recurring “from” time
dailyTillSpecify daily recurring “till” time
-occursSpecify recurring period type.hour, min
-occurValueSpecify recurring period value
-everyForceSpecify recurring type for force incremental backupday, week, month, dayofmonth, real-time
-atForceSpecify datetime or time of schedule for force incremental backup"datetime" or "time"
-dayForceSpecify day for “dayofmonth” schedule1..31
-weekdayForceSpecify days(s) of week for weekly schedule for force incremental backup.List of weekdays (e.g. "su,mo,tu,we,th,fr,sa")
-dailyFromForceSpecify daily recurring “from” time
-dailyTillForceSpecify daily recurring “till” time
-occursForceSpecify recurring period type.hour, min
-occurValueForceSpecify recurring period value

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

MS SQL Server plans

Create backup plan (addBackupMsSqlPlan)

Use the following command to find more details:

cbb.exe addBackupMsSqlPlan ?

Example: Creating a backup plan for "AdventureWorks" and "AdventureWorks2008" databases that runs a Full backup with compression, every work day at 23:00 using SQL authentication:

cbb.exe addBackupMsSqlPlan -n "Backup MS SQL databases" -a mssql_backup -instancename "SQL2008" -username sa -password "qwerty" -winauth no -dbselectiontype Selected -databases "AdventureWorks;AdventureWorks2008" -c yes -every week -at "23:00" -weekday "mo, tu, we, th, fr"

Specific parameters for MS SQL Server backup plan:

  1. SQL Server instance name:-instance "Name" (e.g. "Computer\NamedInstance")
  2. Authentication:SQL Authentication:-username "SqlUserName" -password "SqlPassword"Windows Authentication-winauth no|yes
  3. Databases:-dbselectiontype All|User|SelectedFor "Selected" type you need to specify a list of databases using -databases parameter (e.g. -databases "AdventureWorks;AdventureWorks2008")
  4. Copy-only backup-copyonly no|yes (by default "no")
  5. Verify backup-verify no|yes (by default "no")
  6. Scheduling full, differential, transaction log backupsFull backup: -every|-at|-occurs (see related option in "How to define specific schedules for file-level backup/restore")Differential backup: -everyDiff|-atDiff|-occursDiff with related options -dayDiff, -weekdayDiff, -weeknumberDiff, dailyFromDiff, dailyTillDiff, occurValueDiffTransaction log backup: -everyTLog|-atTLog|-occursTLog with related options -dayTLog, -weekdayTLog, -weeknumberTLog, dailyFromTLog, dailyTillTLog, occurValueTLog

Edit backup plan (editBackupMsSqlPlan)

Use the following command to find more details:

cbb.exe editBackupMsSqlPlan ?

Create restore plan (addRestoreMsSqlPlan)

Use the following command to find more details:

cbb.exe addRestoreMsSqlPlan ?

Example: Creating a plan for restoring "AdventureWorks" database to the same database on the original SQL Server instance (using SQL authentication):

cbb.exe addRestoreMSSQLPlan -n "Restore MS SQL database" -a mssql_backup -instancename "SQL2008" -username sa -password "qwerty" -winauth no -dbin "SQL2008" -dbn "AdventureWorks" -dbnn "AdventureWorks" -ov yes

Specific parameters for MS SQL Server restore plan:

  1. SQL Server data and log directories that will be used for restored database:-dp "DataPath" -lp "LogPath"
  2. SQL database filename for restoring - you can use a %DATABASENAME% macros that will automatically use an original database name to generate the database filename (e.g. %DATABASENAME%_restored):-fm "FileName"
  3. Overwriting existing database files:-ov yes | no
  4. Closing existing database connections before the restore:-cc yes | no
  5. Specifying a databases name to restore as:-dbin "InstanceName" -dbn "DatabaseName" -dbnn "NewDatabaseName"

Example: restoring the "AdventureWorks" database as "AdventureWorks_restored"

-dbin "SQL2008" -dbn "AdventureWorks" -dbnn "AdventureWorks_restored"

Image-based plans

Create backup plan (addBackupIBBPlan)

Use the following command to find more details:

cbb.exe addBackupIBBPlan ?

Example: Creating an image-based backup plan for backing up system required volumes to an external drive (i.e. files system account called fileSsytemConnectionName) with compression every friday at 23:00:

cbb.exe addBackupIBBPlan -n "Backup system required volumes" -a fileSystemConnectionName -r -disableVSS -c yes-every week -at "23:00" -weekday "fr"

Specific parameters for MS SQL Server backup plan:

Specifying what volumes to back up:

  • -r – only system required volumes
  • -av – all volumes
  • -v "volumeID" – specified volume(s)
  • -ignoreBadSectors – allows to ignore bad sectors. Values: yes (default), no

Using VSS:

  • -disableVSS – allows to use a direct access to NTFS volume. Values: yes, no (default)
  • -useSystemVSS – allows to use system VSS provider. Values: yes, no (default)

Manage blocks for block-level backup:

  • -useBlockLevelBackup – enables block-level backup. Values: yes (default), no
  • -blockSize – defines a block size (KB). Values: 128, 256, 512, 1024 (default)

Edit backup plan (editBackupIBBPlan)

Use the following command to find more details:

cbb.exe editBackupIBBPlan ?

Create restore plan (addIBBRestorePlan)

Use the following syntax to find more details:

cbb addIBBRestorePlan ?

Example: Here is sample command to restore the image copy:

  1. named RestoreIBBPlanFromCLI
  2. restores all volumes from the latest backup
  3. of disk specified by diskFromBackup parameter as VHD virtual disk
  4. to folder D:\restoreTarget

cbb addIBBRestorePlan -n RestoreIBBPlanFromCLI -a fileSystemConnection -rt LatestVersion -av -vdt \"Hyper-V Virtual Disk (VHD-format) fixed" -diskFromBackup 00000000-0000-0000-0000-000000000000 -vdn RestoredVirtualDisk -vdf d:\restoreTarget\

Specific parameters for image-based restore plan:

  1. Physical or virtual target:-pd(-physicalDisk) Restore to physical disk specified by Id. You can list existing disks using cbb listDiskVolumescommand.-pv(-physicalVolume) Restore to volume specified by id. You can list existing volumes using cbb listDiskVolumescommand.-vdt(-virtualDiskType) Restore to virtual disk. You need to specify one of the types:
    • RAW disk image
    • VirtualBox Virtual Disk fixed
    • VirtualBox Virtual Disk dynamic
    • Hyper-V Virtual Disk (VHDX-format) dynamic
    • Hyper-V Virtual Disk (VHD-format) fixed
    • Hyper-V Virtual Disk (VHD-format) dynamic
    • VMware Virtual Disk vmfsfixed
    • VMware Virtual Disk vmfsdynamic

    -vdn(-virtualDiskName) Set target virtual disk name

    -vdf(-virtualDiskFolder) Set target virtual disk destination folder

  2. Source drive:-did(-diskId,-diskFromBackup) Backed up disk id. You can list backed up disks using cbb listIBBContentcommand.-av(-allVolumes) Restore all volumes.-v(-selectedVolume) Restore volume by id. It is WindowsVolumeIdentity from the result of the cbb listIBBContent command.

Make bootable drive (createrecovery)

Command help

cbb.exe createrecovery ?To create a password-protected bootable USB

cbb.exe createrecovery -d "F:" -p "qwerty"To create a password-protected ISO file

cbb.exe createrecovery -d "D:\Temp\win2008s.iso" -iso -p "qwerty"

Common operations

List plans (plan -l)

Lists all available plans (name and id):

cbb.exe plan -l

Run / Stop plan (plan -r, plan -s)

To run a certain plan, run the command:

cbb.exe plan -r "planname"To stop a particular plan, run the command:

cbb.exe plan -s "planname"

Delete plan (deleteBackupPlan)

To delete a certain plan, run the command:

cbb.exe deleteBackupPlan -n "Work Documents"

View plan settings (getBackupPlanDetails)

cbb.exe getBackupPlanDetails -n "Work Documents"orcbb.exe getBackupPlanDetails -id planID

Notification Settings (notificationSettings)

Email address to receive notification email when backup completes

cbb.exe notificationSettings -email your@emailwhere -username is optional.

Name of user (optional)

cbb.exe notificationSettings -username nameofuserSpecify to use own SMTP server for email notifications

cbb.exe notificationSettings -usesmtp yes/noSpecify SMTP Server address

cbb.exe notificationSettings -server serveraddressSpecify SMTP Server port

cbb.exe notificationSettings -port serverportSpecify Email From

cbb.exe notificationSettings -emailfrom from@emailUse SSL

cbb.exe notificationSettings -usesslSMTP requires authentication

cbb.exe notificationSettings -smtpauth yes/noSpecify SMTP user name if SMTP Server requires authentication

cbb.exe notificationSettings -smtpUser usernameSpecify password if SMTP Server requires authentication

cbb.exe notificationSettings -smtppassword password

Configuration Commands

Working with Network credentials

nwcList - lists network credentials

ParameterDescriptionValue
-sGet the network credentials list
-tGet the network credentials list and perform the availability test
-?Display help for the command

nwcAdd - adds network credentials

ParameterDescriptionValue
-nSpecify the share path
-lSpecify the share login
-pSpecify the share password
-?Display help for the command

nwcDelete - deletes network credentials

ParameterDescriptionValue
-aDelete all credentials
-nDelete credentials with a specified share path
-lDelete credentials with a specified share login
-nlDelete credentials with specified share path and login
-?Display help for the command

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 pathwhere "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.

Shrink repository database (database)

Use the following command to shrink repository database:

cbb.exe database -shrink

Switching to All Users mode

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 commonAs 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 currentNote: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 ?

ParameterDescriptionValue
-userModeChange 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
-databaseLocationChange 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.
-mssqlTempLocationChange 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 bandwidthUnlimited(u), 1-100000
-proxyProxy typeno, auto, manual
-paProxy address
-ppProxy port
-ptProxy authenticationyes,no
-puProxy user
-pdProxy domain
-psProxy password
-csChunk size in KBs1-1048576
-t(-threads)Upload threads count1-99
-purgePurge versions that are older than specified periodno, 1d(w,m,y) where d=days, w=weeks, m=months, y =years; 1-400
-delayPurgeAllows to delay purge for a certain period.no, 1d(w,m) where d=days, w=weeks, m=months
-keepKeep number of versionsall, 1-100
-hpPurge historyno, 1d(w,m,y) where d=days, w=weeks, m=months, y =years; 1-400
-hkKeep number of records in historyall, 1-100
-l(ogging)Logging levelno,l(ow),h(igh),d(ebug)

Troubleshooting

Send log (sendLog)

Use the following command to find more details:

Send log (sendLog):

cbb.exe sendLog ?

ParameterDescriptionValue
-uName (optional)
-eEmail
-mDescription of the issue

Save log (saveLog)

Use the following command to find more details:

Save log (saveLog):

cbb.exe saveLog ?

ParameterDescriptionValue
-pTarget path for saving logs

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

Use the following command to find more details for supported commands:

cbb.exe ?

Not found what you're looking for?

Contact our customer care team here.