Platform: LinuxProducts: MSP360 Backup
Article ID: s0463Last Modified: 27-Mar-2025

Create Backup Plans (CLI 2.0)

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

Note that all actions and settings in the new backup format are supported in the CLI V2 only

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

To create a new backup plan, use the plan create_backup file command.

Example:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan create_backup file -a "s3_test" -f 'nbf' -s '/home/user/test data' -c
MSP360 Backup Command Line Interface started


Success.

This chapter covers the following topics:

Command Parameters

All command parameters can be found by executing the following command (command's results here are in a short form, since the command has numerous parameters):

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan create_backup -h
MSP360 Backup Command Line Interface started


create_backup  - create a new plan to backup files to storage
Usage: /opt/local/MSP360 Backup/raw_bin/cbbCommandLineV2 [options]


Options:
  -n, --name <planName>                             Backup plan name. Default
                                                    value is “Backup plan
                                                    dd.mm.yyyy hh:mm:ss”
  -c, --confirm                                     Confirm create or edit
                                                    plan
  -f, --format <cbf/nbf>                            Sets the backup format.
                                                    Possible values: nbf, cbf

etc.

Any parameter's options can be found in this list:

  --schedule <true/false>                         	Enables schedule for the
                                                  	plan. Possible values:
                                                  	true, false (default)
  --specific-date-option <true/false>             	Runs the plan on a
                                                  	specific date. Applies to
                                                  	the current backup format
                                                  	only. Possible values:
                                                  	true, false (default)

All obligatory parameters will be shown if any are absent:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan create_backup file
MSP360 Backup Command Line Interface started


Option [ a,account ] is mandatory
ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan create_backup file -a "s3_test"
MSP360 Backup Command Line Interface started


Options [ f,format ] is mandatory (Possible: cbf/nbf)

| Top |

Create Backup Plan Command Examples

Create Backup Plan in the New Backup Format

The most common use case is to create a backup plan in the new backup format and specify the plan name, storage account and source.

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan create_backup file --format nbf --name "My first plan Name" --account "s3_test" --source "/home/user/test data" --confirm
MSP360 Backup Command Line Interface started


Success.

If the backup plan has no name parameter (it is not obligatory) - it will have the name with the timestamp of the creation date. For example: Backup plan on 3/25/25 5:42 AM.

The example of creating a scheduled backup plan.

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan create_backup --name "plan65" -a "s3_test" -f "nbf" -s "/home/user/test data" --schedule "true" --use-recurring-option "true" --frequency-value "Monthly" --monthly-type-value "1" --monthly-repeat-from "26.03.2025" -c
MSP360 Backup Command Line Interface started


Success.

Create Backup Plan in the current backup format

The command example to create a backup plan in the currenty backup format:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan create_backup file --format cbf --name "Plan Name" --account "s3_test" --source "/home/user/test data" --confirm
MSP360 Backup Command Line Interface started


Success.

| Top |

List all existing plans

All existing plans can be seen by executing this command:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan list
MSP360 Backup Command Line Interface started

list  - list all plan names and ids
Usage: /opt/local/MSP360 Backup/raw_bin/cbbCommandLineV2 [options]

Options:
  -b, --backup   Lists existing backup plans
  -r, --restore  Lists existing restore plans

Example (listing all backup plans):

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan list -b
MSP360 Backup Command Line Interface started

Backup plan list
1 : Display name: test_backup
	Id: {2602d3e8-645c-49cf-bede-e7268e2174d9}
	Type: File
	Status: Stopped
	Last run status: Fail
	Last run time: Wed Mar 26 15:26:29 2025 GMT

2 : Display name: another_plan
	Id: {e315dfb2-07e3-4766-bc88-415149fe6404}
	Type: File
	Status: Stopped
	Last run status: Success
	Last run time: Wed Mar 26 15:32:11 2025 GMT


Success.

This command also helps checking the current status of a backup plan and the last run results. Here is an example of a running backup plan:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan list -b
MSP360 Backup Command Line Interface started


Backup plan list
1 : Display name: test_backup
	Id: {2602d3e8-645c-49cf-bede-e7268e2174d9}
	Type: File
    Status: Running
	Last run status: Running
	Last run time: Wed Mar 26 16:38:03 2025 GMT


Success.

| Top |

Check backup plan details

The command to check a backup plan details:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan details
MSP360 Backup Command Line Interface started

details  - get plan details
Usage: /opt/local/MSP360 Backup/raw_bin/cbbCommandLineV2 [options]

Options:
  -i, --id <planId>  	Plan ID
  -n, --name <planName>  Plan name
  --progress         	Add progress info to details

Example:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan details -n 'test_backup'
MSP360 Backup Command Line Interface started

Name             	: test_backup
Type             	: Backup
ID               	: {2602d3e8-645c-49cf-bede-e7268e2174d9}
Destination ID   	: {932691e0-bdaf-4d22-8cbe-2d812238c0b4}
Destination name 	: local
Notification: disabled
Backup items:
	/home/user/test data
Compression        	: true
Do not backup hidden files : true
Backup empty folders   : false
Encryption         	: false
Schedule           	: Not scheduled
Run missed plan    	: false
Stop plan after    	: false
Retention policy:
	Do not Purge (Keep backup forever)
Consistency check  	: true


Success.

| Top |

Run Backup Plan

The command to execute a backup plan:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan start
MSP360 Backup Command Line Interface started

start  - run custom plan now
Usage: /opt/local/MSP360 Backup/raw_bin/cbbCommandLineV2 [options]

Options:
  --id <planId>      	Plan id
  -n, --name <planName>  Plan name
  -f, --force-full   	Forces full backup

Example for an actual plan execution:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan start --name "test_backup"
MSP360 Backup Command Line Interface started


Success.

This command runs a forced full backup:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan start --name "test_backup" -f
MSP360 Backup Command Line Interface started


Success.

| Top |

Stop Backup Plan

The command:

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan stop
MSP360 Backup Command Line Interface started


stop  - stop plan now
Usage: /opt/local/MSP360 Backup/raw_bin/cbbCommandLineV2 [options]


Options:
  --id <planId>      	Plan ID
  -n, --name <planName>  Plan name

Example (how to stop a running backup plan):

ubuntuuser@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan stop -n 'test_backup'
MSP360 Backup Command Line Interface started


Success.
anastasia@ubuntu:/opt/local/MSP360 Backup/bin$ ./cbbV2 plan list -b
MSP360 Backup Command Line Interface started


Backup plan list
1 : Display name: test_backup
	Id: {2602d3e8-645c-49cf-bede-e7268e2174d9}
	Type: File
	Status: Stopped
	Last run status: Interrupted
	Last run time: Wed Mar 26 16:43:09 2025 GMT


Success.

| Top |

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