New Backup Format in CLI
The new backup format and all its features are supported in the command line interface along with the GUI.
This chapter covers the following topics:
- Start CLI
- Data listing
- Create backup plan in the new backup format
- Create restore plan in the new backup format
- Edit backup plan
- EFS Encryption Backup
- Assign GFS retention policy
- Enable Immutability
Start CLI
To start using CLI, run the Command Prompt with local administrator permissions.
Next, navigate to the folder where you installed the application. In the example below, the default path is shown.
cd "C:\Program Files\CloudBerryLab\CloudBerry Backup\"
Data Listing
To list data on backup storage, use the cbb list command:
cbb list -aid "e472e308-5afd-4f1f-855b-8e7bb4a80018"
Command parameters:
- -a(-aid) Account Name or Account ID
Examples:
- -a "Account Name"
- -a "e472e308-5afd-4f1f-855b-8e7bb4a80018"
- -aid "AccountName" -aid "e472e308-5afd-4f1f-855b-8e7bb4a80018"
- -p(-prefix) Performs listing using the specified backup prefix
- -b(-bunch) List bunches (only for the new backup format)
- -g(-generation) List generation (only for the new backup format)
- -rp(-restorePoint) List of restore points and plan execution for the specified bunch (only for the new backup format)
- -d(-directory) Lists directory
- -f(-file) lists file
- -path Sets the path to backup content to display while listing. Elements are separated by ''
- -blp BitLocker password. Sets the BitLocker password for BitLocker-encrypted backups
- -ep Encryption password. Sets the encryption password
- -output. Output format. Possible values: short, full (default)
Create File Backup Plan in the New Backup Format
View the example of the backup plan creation command in the new backup format.
addBackupPlan -nbf -n planName <-a accountName | -aid accountID> -f pathToFile -d directory [-skipf folders] [-useBlockLevelBackup [yes | no]] [-ntfs yes | no] [-s [yes | no]] [-ifm includeFilesMask | -efm excludeFileMask] [-es [yes | no]] [-c [yes | no]] [-ea [AES128-256] -ep password [-sse [yes | no]] [- sia [yes | no]] [-oa date] [[-every [day, week, month, dayofmonth]] [-at specificDateTime] [-day [1..31]] [-weekday listOfWeekDays] [-weeknumber weeknumber] [-repeatEvery repeatPeriod -repeatStartDate startDate]]] [-everyForceFull [day, week, month, dayofmonth]][-atForceFull specificDateTime] [-dayForceFull [1..31]] [-weekdayForceFull listOfWeekDays] [-weeknumberForceFull weeknumber] [-repeatEveryForceFull repeatPeriod -repeatStartDateForceFull startDate]] [-sp [yes | no]] [-df days] [-preAction "command" -pac [yes | no]] [-postAction "command" -paa [yes | no]] [-notification [errorOnly | on | off] [-dr [yes | no]]] [-winLog [errorOnly | on | off]] [-r]
Command parameters:
- -nbf. Sets the new backup format. The parameter has no arguments.
- -a(-aid) Account Name or Account ID
Examples:
- -a "Account Name"
- -a "e472e308-5afd-4f1f-855b-8e7bb4a80018"
- -aid "AccountName" -aid "e472e308-5afd-4f1f-855b-8e7bb4a80018"
- -n. Sets the plan name
- -cloneplan(-clone) Clones an existing plan. Use this command with the name of the plan to be cloned.
- -sync Run a consistency check before the plan. Possible values: yes, no(default)
- -stopAfter Specify time in HH:MM to stop the plan if it runs for HH hours MM minutes. Example -stopAfter "20:30" or
- -stopAfter "100:00" etc.
- -c Enable compression. Possible values: yes(default), no
- -ea Enable AES encryption algorithm. Possible values: AES128-256
- -ep Specify encryption password
- -sc Storage Class. This parameter can be applied to Amazon S3 storage accounts only. Possible values: Standard, IntelligentTiering, StandardIA, OneZoneIA, Glacier, GlacierInstantRetrieval, GlacierDeepArchive
- -sse Use server-side encryption. Possible values: yes, no(default). Note: applies only to Amazon S3 storage
- -fcCheck Use a full consistency check. Possible values: yes(default), no
- -preAction Specify a command or script to be executed before the backup plan runs
- -pac Specify whether to continue the backup plan if a pre-backup action fails. Possible values: yes, no
- -postAction Specify a command or script to be executed after the backup is completed
- -paa Execute a post-backup action in any case (regardless of the backup plan result). Possible values: yes, no
- -chainPlanOn(-cpOn) Forms the backup chain: as the current plan completes, runs the next specified plan. Plan name or plan ID can equally be an argument. Example: -cpOn "Chained plan name" or -cpOn 60aa5605-915c-4e2d-9c6d-470d6127a8d5
- -chanPlanOff(-cpOff) Unchains the chained plan. Example: -cpOff
- -chainPlanAfterSuccess(-cpAS) Executes the chained plan only if the current plan is completed successfully. Possible values: yes, no(default). Example: -cpAS yes
- -chainPlanForceFull(-cpFF) Forces a full backup for the chained plan. Possible values: yes, no(default). Example: -cpFF no
- -notification Specify notification settings for the backup plan. Note that if the notification is turned on, notification settings must be configured. To configure notification settings, refer to 'cbb.exe notificationSettings /?' command for details. Possible values: errorOnly, on, off
- -subject(-notificationSubject). Specify the notification subject that will be in the notification message title
- -winLog Add entry to Windows Event Log when backup plan fails(errorOnly) or in all cases(on). Possible values: errorOnly, on, off
- -purge Purge versions that are older than the specified period (except the latest version). Possible values: no, 1d(day), 1w(week), 1m(month)
- -runMissed Run missed scheduled backup plan immediately when the computer starts up. Possible values: Yes, No
- -fastNtfs The Fast NTFS scan speeds up backup processing by using a low-level API for accessing NTFS structures. This option is useful for NTFS volumes with a large number of files. Possible values: yes(default), no
- -ntfs Back up NTFS permissions
- -vss Force using VSS (Volume Shadow Copy Service). Possible values: yes(default), no
- -keepEfsEncryption Back up EFS files as encrypted. Possible values: yes, no(default).
- -sharerw Use share read/write mode on errors. This can help if a file is open in share read/write mode. Possible values: yes, no(default)
- -f Back up file(s)
- -d Back up a directory
- -rf Excludes a file from a backup dataset. Example: -rf "C:\swapfile.sys" -rf "C:\pagefile.sys"
- -rd Excludes a directory from a backup dataset. Example: -rd "C:\Windows\Temp"
- -df Delete files that have been deleted locally after the specified number of days. Example: "-df 30". Note: this parameter is not compatible with the new backup format.
- -bef Back up empty folders. Possible values: yes, no(default)
- -oa Back up files only after a specific date. Example: 11.08.2022 16:17
- -es Except system and hidden files. Possible values: yes(default), no
- -skipf Skip folders. Example: -skipfolder "bin;temp;My*"
- -ifm Select files by mask to include in the backup plan. Example: -ifm ".doc;.xls"
- -efm Select files by mask to exclude from the backup plan. Example: -efm ".bak;.tmp"
- -iepnf Ignore 'path not found' errors. Possible values: yes, no(default)
- -every Specify the schedule recurring type. Possible values: day, week, month, dayofmonth, real-time. Note: possible values for the new backup format: day, month, dayofmonth
- -at Specify the date and time or time of the schedule. Example: -at "11.08.2022 16:17" , or -at "16:17" for every day schedule
- -day Specify the day for the 'dayofmonth' schedule (1..31)
- -weekday listOfWeekDays. Specify day(s) of week for weekly schedule. Example: "su, mo, tu, we, th, fr, sa". Or specify day of week for monthly schedule
- -weeknumber. Specify the week number: First, Second, Third, Fourth, Penultimate, Last
- -dailyFrom. Specify the daily recurring "from" value
- -dailyTill. Specify the daily recurring "till" value
- -occurs. Specify the recurring period type. Possible values: hour, min
- -occurValue Specify recurring period value
- -repeatEvery. Specify the repeat period value. Possible values: 1..31
- -repeatStartDate. Specify the start date for the recurring schedule
- -everyForceFull Specify the force full schedule recurring type. Possible values: day, week, month, dayofmonth. Note: possible values for the new backup format: day, month, dayofmonth
- -dayForceFull Specify the day for the 'dayofmonth' force full schedule (1..31)
- -weekdayForceFull listOfWeekDays. Specify day(s) of week for weekly force full schedule. Example: "su, mo, tu, we, th, fr, sa". Or specify day of week for monthly force full schedule
- -repeatEveryForceFull Specify the force full repeat period value. Possible values: 1..31
- -repeatStartDateForceFull Specify the force full start date for the recurring schedule
- -output Output format. Possible values: short, full (default)
Create Restore Plan in the New Backup Format
View the example of the restore plan creation command (the new backup format):
- Get the required data as described here.
- Create a restore plan by specifying the bunch, the restore point if you want a specific point in time (if no restore point is specified, the latest version will be used), -f for a specific file or -d for a directory, and -rLocation for the restore location (if nothing is specified, it will be restored to the original location).
cbb addRestorePlan -a "Local" -n "Restore2"-bunch "89ee7222-e01b-4d25-846c-f3bc45c835e0" -f "C:\Users\jason\Desktop\NBF Restore.txt" -rLocation "C:"
- Finally, you can either use Backup Agent to start the created plan or start it using the CLI with the cbb plan -r "Plan Name" command:
cbb plan -r "Plan Name":
Edit Backup Plan in the New Backup Format
View the example of the backup plan editing command in the new backup format.
editBackupPlan -nbf -n planName <-a accountName | -aid accountID> -f pathToFile -d directory [-skipf folders] [-useBlockLevelBackup [yes | no]] [-ntfs yes | no] [-s [yes | no]] [-ifm includeFilesMask | -efm excludeFileMask] [-es [yes | no]] [-c [yes | no]] [-ea [AES128-256] -ep password [-sse [yes | no]] [- sia [yes | no]] [-oa date] [[-every [day, week, month, dayofmonth]] [-at specificDateTime] [-day [1..31]] [-weekday listOfWeekDays] [-weeknumber weeknumber] [-repeatEvery repeatPeriod -repeatStartDate startDate]]] [-everyForceFull [day, week, month, dayofmonth]][-atForceFull specificDateTime] [-dayForceFull [1..31]] [-weekdayForceFull listOfWeekDays] [-weeknumberForceFull weeknumber] [-repeatEveryForceFull repeatPeriod -repeatStartDateForceFull startDate]] [-sp [yes | no]] [-df days] [-preAction "command" -pac [yes | no]] [-postAction "command" -paa [yes | no]] [-notification [errorOnly | on | off] [-dr [yes | no]]] [-winLog [errorOnly | on | off]] [-r]
Command parameters:
- -nbf. Sets the new backup format. The parameter has no arguments.
- -a(-aid) Account Name or Account ID
Examples:
- -a "Account Name"
- -a "e472e308-5afd-4f1f-855b-8e7bb4a80018"
- -aid "AccountName" -aid "e472e308-5afd-4f1f-855b-8e7bb4a80018"
- -n. Sets the plan name
- -cloneplan(-clone) Clones an existing plan. Use this command with the name of the plan to be cloned.
- -sync Run a consistency check before the plan. Possible values: yes, no(default)
- -stopAfter Specify time in HH:MM to stop the plan if it runs for HH hours MM minutes. Example -stopAfter "20:30" or
- -stopAfter "100:00" etc.
- -c Enable compression. Possible values: yes(default), no
- -ea Enable AES encryption algorithm. Possible values: AES128-256
- -ep Specify encryption password
- -sc Storage Class. This parameter can be applied to Amazon S3 storage accounts only. Possible values: Standard, IntelligentTiering, StandardIA, OneZoneIA, Glacier, GlacierInstantRetrieval, GlacierDeepArchive
- -sse Use server-side encryption. Possible values: yes, no(default). Note: applies only to Amazon S3 storage
- -fcCheck Use a full consistency check. Possible values: yes(default), no
- -preAction Specify a command or script to be executed before the backup plan runs
- -pac Specify whether to continue the backup plan if a pre-backup action fails. Possible values: yes, no
- -postAction Specify a command or script to be executed after the backup is completed
- -paa Execute a post-backup action in any case (regardless of the backup plan result). Possible values: yes, no
- -chainPlanOn(-cpOn) Forms the backup chain: as the current plan completes, runs the next specified plan. Plan name or plan ID can equally be an argument. Example: -cpOn "Chained plan name" or -cpOn 60aa5605-915c-4e2d-9c6d-470d6127a8d5
- -chanPlanOff(-cpOff) Unchains the chained plan. Example: -cpOff
- -chainPlanAfterSuccess(-cpAS) Executes the chained plan only if the current plan is completed successfully. Possible values: yes, no(default). Example: -cpAS yes
- -chainPlanForceFull(-cpFF) Forces a full backup for the chained plan. Possible values: yes, no(default). Example: -cpFF no
- -notification Specify notification settings for the backup plan. Note that if the notification is turned on, notification settings must be configured. To configure notification settings, refer to 'cbb.exe notificationSettings /?' command for details. Possible values: errorOnly, on, off
- -subject(-notificationSubject). Specify the notification subject that will be in the notification message title
- -winLog Add entry to Windows Event Log when backup plan fails(errorOnly) or in all cases(on). Possible values: errorOnly, on, off
- -purge Purge versions that are older than the specified period (except the latest version). Possible values: no, 1d(day), 1w(week), 1m(month)
- -runMissed Run missed scheduled backup plan immediately when the computer starts up. Possible values: Yes, No
- -fastNtfs The Fast NTFS scan speeds up backup processing by using a low-level API for accessing NTFS structures. This option is useful for NTFS volumes with a large number of files. Possible values: yes(default), no
- -ntfs Back up NTFS permissions
- -vss Force using VSS (Volume Shadow Copy Service). Possible values: yes(default), no
- -keepEfsEncryption Back up EFS files as encrypted. Possible values: yes, no(default).
- -sharerw Use share read/write mode on errors. This can help if a file is open in share read/write mode. Possible values: yes, no(default)
- -f Back up file(s)
- -d Back up a directory
- -rf Excludes a file from a backup dataset. Example: -rf "C:\swapfile.sys" -rf "C:\pagefile.sys"
- -rd Excludes a directory from a backup dataset. Example: -rd "C:\Windows\Temp"
- -df Delete files that have been deleted locally after the specified number of days. Example: "-df 30". Note: this parameter is not compatible with the new backup format.
- -bef Back up empty folders. Possible values: yes, no(default)
- -oa Back up files only after a specific date. Example: 11.08.2022 16:17
- -es Except system and hidden files. Possible values: yes(default), no
- -skipf Skip folders. Example: -skipfolder "bin;temp;My*"
- -ifm Select files by mask to include in the backup plan. Example: -ifm ".doc;.xls"
- -efm Select files by mask to exclude from the backup plan. Example: -efm ".bak;.tmp"
- -iepnf Ignore 'path not found' errors. Possible values: yes, no(default)
- -every Specify the schedule recurring type. Possible values: day, week, month, dayofmonth, real-time. Note: possible values for the new backup format: day, month, dayofmonth
- -at Specify the date and time or time of the schedule. Example: -at "11.08.2022 16:17" , or -at "16:17" for every day schedule
- -day Specify the day for the 'dayofmonth' schedule (1..31)
- -weekday listOfWeekDays. Specify day(s) of week for weekly schedule. Example: "su, mo, tu, we, th, fr, sa". Or specify day of week for monthly schedule
- -weeknumber. Specify the week number: First, Second, Third, Fourth, Penultimate, Last
- -dailyFrom. Specify the daily recurring "from" value
- -dailyTill. Specify the daily recurring "till" value
- -occurs. Specify the recurring period type. Possible values: hour, min
- -occurValue Specify recurring period value
- -repeatEvery. Specify the repeat period value. Possible values: 1..31
- -repeatStartDate. Specify the start date for the recurring schedule
- -everyForceFull Specify the force full schedule recurring type. Possible values: day, week, month, dayofmonth. Note: possible values for the new backup format: day, month, dayofmonth
- -dayForceFull Specify the day for the 'dayofmonth' force full schedule (1..31)
- -weekdayForceFull listOfWeekDays. Specify day(s) of week for weekly force full schedule. Example: "su, mo, tu, we, th, fr, sa". Or specify day of week for monthly force full schedule
- -repeatEveryForceFull Specify the force full repeat period value. Possible values: 1..31
- -repeatStartDateForceFull Specify the force full start date for the recurring schedule
- -output. Output format. Possible values: short, full (default)
Keep EFS Encryption in Backup
The new backup format features the possibility of backing up EFS-encrypted files 'as is', in their encrypted state.
To back up EFS-encrypted files in the encrypted state, use the -keepEfsEncryption parameter. The parameter has two values:
- yes. Set this value to back up EFS-encrypted files in encrypted form.
- no. Set this value to decrypt EFS-encrypted files first and only then back them up to storage.
Example:
addBackupPlan -a "myAWS" -n "EFS Backup to S3" -d "C:\EFS\files"-efsEncrypted yes
Assign GFS Retention Policy
To assign a GFS retention policy, use the addbackupplan or editbackupplan commands (or the appropriate commands to create or edit a backup plan of the required type: image-based, VMware, Hyper-V) with the following parameters:
- -gfsW(-gfsWeekly) Enables GFS weekly storage type. Possible values: 1-100000. Example: -gfsW N or -gfsWeekly N, where N is the number of weeks the full backup in GFS retention is kept
- -gfsM(-gfsMonthly) Enables GFS monthly storage type. Possible values: 1-10000. Example: -gfsM N or -gfsMonthly N, where N is the number of months the full backup in GFS retention is kept
- -gfsY(-gfsYearly) Enables GFS yearly storage type. Possible values: 1-1000. Example: -gfsY N or -gfsYearly N, where N is the number of years the full backup in GFS retention is kept
- -gfsYMonth(-gfsYearlyMonth) Specify the month number for the first successful GFS full backup for yearly storage type. Possible values: 1-12
Example:
cbb editbackupplan -n "My GFS settings" -aid "AccountName" -aid "e472e308-5afd-4f1f-855b-8e7bb4a80018" -gfsW 3 -gfsM 2 -gfsY 2
Enable Immutability
To enable the Immutability feature, use the addbackupplan or editbackupplan commands (or the appropriate commands to create or edit a backup plan of the required type: image-based, VMware, Hyper-V) with the following parameters:
- -Immutability(-im) Enable immutability. Immutability must be used with enabled GFS policy and must be approved with additional parameter(-confirmenablingimmutability). Possible values: true, false(default). Note: this parameter can be applied with the new backup format only.
- -confirmenablingimmutability Parameter that confirms enabling immutability. The parameter does not have values. Must be used with the -Immutability parameter. Note: this parameter can be applied with the new backup format only.
Example:
cbb editbackupplan -n "Immutable data" -aid "AccountName" -aid "e472e308-5afd-4f1f-855b-8e7bb4a80018" -im -confirmenablingimmutability