Create Restore Plans (CLI 2.0)

As of Backup 4.0 for Linux, a new command line interface (CLI V2)is introduced. CLI V2 is a separate command line interface solution that has the enhanced functionality that covers the new backup format requirements.

Create Restore Plan Using CLI V2 (new and current backup formats)

To create a new restore plan, use the plan create_restore file command.

./cbbV2 plan create_restore --name "Plan Name" --account "Account Name" --source "Source" --confirm

Create Restore Plan Command Examples

  • ./cbbV2 plan create_restore -a "MyAmazon" -s /home/tmp -c
  • ./cbbV2 plan create_restore -a "MyAzure" -s "/home/tmp –restore-location" "/home/tmp2" -c
  • ./cbbV2 plan create_restore -a test4 -s "/home/jsmith/tmp --overwrite-files "true" --restore-new-files "true" -c
  • ./cbbV2 plan create_restore -a test4 -s /home/jsmith/tmp --decryption-password 123 -c
  • ./cbbV2 plan create_restore -a s3 -s /home/jsmith/tmp --transfer-acceleration true -c
  • ./cbbV2 plan create_restore -a s3 -s /home/jsmith/tmp --glacier-retrieval-rate "Bulk" -c
  • ./cbbV2 plan create_restore -a test4 -s /home/jsmith/tmp --restore-point "12.03.2023 12:00" -c
  • ./cbbV2 plan create_restore -a test4 -s /home/jsmith/tmp --bunch "Bunch" -c. Creates a restore plan with a specific bunch

Run Restore Plan

View the command examples to execute restore plans:

  • ./cbbV2 plan start -n "Plan Name". This command runs the plan named "Plan name"
  • ./cbbV2 plan start –name "Plan Name". This command runs the plan named "Plan name"
  • ./cbbV2 plan start –id "Plan ID". This command runs the restore plan with the "Plan ID" instead of a plan name

Stop Restore Plan

View the command examples to stop running restore plans:

  • ./cbbV2 plan stop -n "Plan Name"
  • ./cbbV2 plan stop –name "Plan Name"
  • ./cbbV2 plan stop –id "Plan ID"

Command Parameters

--name (-n)

Sets the restore plan name.

--id

Sets the restore plan ID.

--account (-a)

Sets the storage account for restore plan.

Possible values:

  • AccountID
  • AccountName

--restore-once

Sets the restore mode for the restore plan. Possible values: true, false (default). If a value is set as "true", restore is executed only once, the plan is not saved. If the value is set as "false", the restore plan configuration is saved.

Possible values:

  • true
  • false (default)

--source

Sets the custom restore source on backup storage for item-level restore. This parameter can be used multiple times: as much as required to include all item in one restore plan.

--restore-deleted-files

Restore files that had been deleted at the source location prior to the backup. Possible values:

  • true (default, always true for restore of legacy backup format)
  • false

--restore-location

Sets the path to restore.

--latest-version

Restores the latest version fond on backup storage.

--restore-point

Selects the restore point to restore. Display format: "dd.mm.yyyy hh:mm" or "mm/dd/yy hh:mm AP"

–bunch

Bunch (backup plan) ID or plan name. This parameter applies to the new backup format only

--notification

Sets the condition for sending notification email:

Possible values:

  • on : Notification email will be sent in all cases
  • off : Do not send the notification email
  • error-only (default) : Notification email will be sent if restore plan fails

--subject

Sets the subject of notification email.

Available variables for this parameter:

  • %COMPUTER_NAME%
  • %RESULT%
  • %PLAN_NAME%

Example: --subject "My backup plan %PLAN_NAME% onn %COMPUTER_NAME% is finished %RESULT%"

--run-missed-option

Executes the plan if it was missed for some reason.

Possible values:

  • true
  • false (default)

--decryption-password

Sets the encryption password for encrypted backups to decrypt them upon restore.

--transfer-acceleration (only for Amazon)

Enables or disables S3 transfer acceleration.

Possible values:

  • on
  • off (default)

-–glacier-retrieval-rate (only for Amazon)

Sets the retrieval mode from long-term storage classes. Applies to Amazon S3 storage only.

Possible values:

  • Expedited
  • Standard
  • Bulk
  • Skip

--sync

Runs sync before the plan execution This parameter cannot be applied to the new backup format only.

Possible values:

  • true
  • false (default)

--overwrite-files

Overwrite existing files upon restore.

Possible values:

  • true
  • false

--restore-new-files

Enables or disables the restore new files only option.

Possible values:

  • true
  • false

--schedule

Enables schedule for the plan.

Possible values:

  • true
  • false (default)

--specific-date-option

Runs the plan on a specific date. Applies to the current backup format only.

Possible values:

  • true
  • false (default)

--specific-date-value

Runs the plan on specific date and time. Applies to the current backup format only. Example: --specific-date-value "03.04.2022 14:05"

--stop-auto-option

Enables plan stopping if it runs more than specified period.

Possible values:

  • true
  • false (default)

--stop-auto-hours-value

Sets the value in hours for the --stop-auto-option.

Value range: 0-99.

Example: --stop-auto-option "true" --stop-auto-hours value "6"

--stop-auto-minutes-value

Sets the value in minutes for the --stop-auto-option.

Value range: 0-59

Example: --stop-auto-option "true" --stop-auto-hours value "5" --stop-auto-minutes-value "45"

--use-recurring-option

Enables recurring schedule usage. Applies to the current backup format only.

Possible values:

  • true
  • false (default)

--frequency-value

Sets the frequency value for recurring schedule.

Possible values:

  • Daily
  • Weekly
  • Monthly

Note that "Daily" value can be applied to schedule of restore plans in the current backup format

--occurs-at-option

Enables or disables the 'occurs at' setting in the plan schedule.

Possible values:

  • true
  • false

Example: --occurs-at-option "true"

Applies only with the --frequency-value set "Daily".

--occurs-at-value

Sets the value for 'occurs at' setting in the plan schedule.

Possible values: time in the "hh:mm" format

Applies only with the --frequency-value set "Daily".

--occurs-every-option

Sets the 'occurs every' setting in the plan schedule.

Possible values:

  • on
  • off

Applies only with the --frequency-value set "Daily".

--occurs-every-value

1-60

For only --frequency-value=Daily --occurs-every-from

Time on "hh:mm" format

For only --frequency-value=Daily

--occurs-every-to

Time on "hh:mm" format

For only --frequency-value=Daily

--week-day-numbers

Sets day(s) of the week to execute the plan.

Possible values: days of the week. To set multiple days, separate them with comma.

Value range: 1-7

Example: --week-day-numbers "1,3,4"

For only --frequency-value=Weekly

--monthly-type-value

Sets the type of monthly backup execution.

Possible values: 0-6.

  • If 0 is set, backup will be executed every month on the day specified by --monthly-day parameter.
  • If values in 1-6 [First, Second, Third, Fourth, Penultimate, Last] range are set, backup will be executed every month on the specific week (e.g first week, second week, etc.) on the day specified by --monthly-day parameter.

--monthly-day

Sets the day of the week for plan schedule.

Possible values: day from 1 to 7

Applies with the --frequency-value "Monthly" value.

--monthly-every

Sets the value of month in the plan schedule.

Possible values: month from 1 to 12

Applies with the --frequency-value "Monthly" value.

--monthly-repeat-from

Sets the repeat every value for restore.

Date format: “dd.MM.yyyy”

Applies with the --frequency-value "Monthly" value.

--full-monthly-type-value

Sets the type of monthly backup execution.

Possible values: 0-6.

  • If 0 is set, backup will be executed every month on the day specified by --full-monthly-day parameter.
  • If values in 1-6 [First, Second, Third, Fourth, Penultimate, Last] range are set, backup will be executed every month on the specific week (e.g first week, second week, etc.) on the day specified by --full-monthly-day parameter.
https://git.cloudberrylab.com/egor.m/doc-help-std.git