New Backup Format in CLI

New backup format and all its features are supported in command line interface along with GUI.

This chapter covers the following topics:

Start CLI

To start using CLI, run the Command Prompt under local administrator permissions.

Next, navigate to a folder where you installed the application. In the example below, the default path is shown.

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

| Top |

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)

| Top |

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 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) Clone existing plan. Use this command with the plan name to be cloned.
  • -sync Run 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 for Amazon S3 storage
  • -fcCheck Use full consistency check. Possible values: yes(default), no
  • -preAction Specify command or scipt to be executed before the backup plan runs
  • -pac Specify to continue backup plan if a pre-backup action fails. Possible values: yes, no
  • -postAction Specify command or script to be executed after backup is completed
  • -paa Execute a post-backup action in any case (regardless 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 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 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 notification subject that will be in a 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 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 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 Backup files only after 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 nor found' errors. Possible values: yes, no(default)
  • -every Specify schedule recurring type. Possible values: day, week, month, dayofmonth, real-time. Note: possible values for the new backup format: day, month, dayofmonth
  • -at Specify datetime or time of schedule. Example: -at "11.08.2022 16:17" , or -at "16:17" for every day schedule
  • -day Specify day for '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 number of week First, Second, Third, Fourth, Penultimate, Last
  • -dailyFrom Specify daily recurring from value
  • -dailyTill Specify daily recurring till value
  • -occurs Specify recurring period type. Possible values: hour, min
  • -occurValue Specify recurring period value
  • -repeatEvery Specify repeat period value. Possible values: 1..31
  • -repeatStartDate Specify start date when recurring backup plan schedule is on
  • -everyForceFull Specify force full schedule recurring type. Possible values: day, week, month, dayofmonth. Note: possible values for the new backup format: day, month, dayofmonth
  • -dayForceFull Specify day for '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 force full repeat period value. Possible values: 1..31
  • -repeatStartDateForceFull Specify force full start date when recurring backup plan schedule is on
  • -output Output format. Possible values: short, full(default)

| Top |

Create Restore Plan in the New Backup Format

View the example of the restore plan creation command (the new backup format). To perform the CLI command you might need to find the bunch id, possibly restore point, or other required information for creating the plan.

  1. The first thing you need to do is get the the plan names, types of plans, and bunch IDs using backup storage display name or ID:
cbb list -a "Storage Account Name or ID"
  1. Get all of the restore points using -b "Bunch ID":
cbb list -a "Local" -b "89ee7222-e01b-4d25-846c-xxxxxxxxxxxx"

This data can be used to create a restore plan. 3. Create a restore plan by specifying the bunch, restore point if you want a specific point in time (if no restore plan 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:"
  1. Finally, you can either use the Backup Agent to start the created plan or start it using CLI with cbb plan -r "Plan Name" command:
cbb plan -r "Plan Name":

Edit Backup Plan in the New Backup Format

View the example of the editing the backup plan command in the bew 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 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) Clone existing plan. Use this command with the plan name to be cloned.
  • -sync Run 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 for Amazon S3 storage
  • -fcCheck Use full consistency check. Possible values: yes(default), no
  • -preAction Specify command or scipt to be executed before the backup plan runs
  • -pac Specify to continue backup plan if a pre-backup action fails. Possible values: yes, no
  • -postAction Specify command or script to be executed after backup is completed
  • -paa Execute a post-backup action in any case (regardless 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 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 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 notification subject that will be in a 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 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 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 Backup files only after 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 nor found' errors. Possible values: yes, no(default)
  • -every Specify schedule recurring type. Possible values: day, week, month, dayofmonth, real-time. Note: possible values for the new backup format: day, month, dayofmonth
  • -at Specify datetime or time of schedule. Example: -at "11.08.2022 16:17" , or -at "16:17" for every day schedule
  • -day Specify day for '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 number of week First, Second, Third, Fourth, Penultimate, Last
  • -dailyFrom Specify daily recurring from value
  • -dailyTill Specify daily recurring till value
  • -occurs Specify recurring period type. Possible values: hour, min
  • -occurValue Specify recurring period value
  • -repeatEvery Specify repeat period value. Possible values: 1..31
  • -repeatStartDate Specify start date when recurring backup plan schedule is on
  • -everyForceFull Specify force full schedule recurring type. Possible values: day, week, month, dayofmonth. Note: possible values for the new backup format: day, month, dayofmonth
  • -dayForceFull Specify day for '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 force full repeat period value. Possible values: 1..31
  • -repeatStartDateForceFull Specify force full start date when recurring backup plan schedule is on
  • -output Output format. Possible values: short, full(default)

| Top |

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 encrypted stste, use the -keepEfsEncryption parameter. The parameter has two values:

  • yes. Set this value to back up EFS-encrypted files encrypted
  • no. Set this value to decrypt EFS-encrypted files first and only then back up to a storage

Example:

addBackupPlan -a "myAWS" -n "EFS Backup to S3" -d "C:\EFS\files"-efsEncrypted yes 

| Top |

Assign GFS Retention Policy

To assign GFS retention policy, use the addbackupplan or editbackuplan(or appropriate commands to create or edit a backup plan of required type (image-based, VMware, Hyper-V) commands 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 number of month 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

| Top |

Enable Object Lock (Immutability)

To to enable the Object Lock (Immutability0 feature, use the addbackupplan or editbackuplan(or appropriate commands to create or edit a backup plan of required type (image-based, VMware, Hyper-V) commands 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

| Top |

https://git.cloudberrylab.com/egor.m/doc-help-mbs.git