Add and Manage Backup Storage

This chapter covers the following topics:

To add a backup storage using CLI, use the addAccount command. Different cloud storage services require different authentication methods with different parameters. Most storage providers, however, rely on Access/Secret key authentication.

Add Storage Account

Add Storage Account Using CLI V2

To add a new storage account, use the following command:

Parameter Description Possible Values
--type Sets the storage account amazons3, alibaba, filesystem, amazons3chinese, s3compatible, alibabacloud, azure, azureblob, backblaze ,sftp, minio, googlestorage
--name Sets storage account name Any
--access-key Access key Set by storage provider
--secret-key Secret key Key Set by storage provider
--bucket Sets bucket name for the storage account Set by storage provider
--prefix Sets bucket prefix Set by storage provider
--ssl Sets SSL usage true (default), false
--endpoint Sets target endpoint (applies to S3 compatible accounts only) Any
--signature-version Specifies signature version (applies to S3 compatible accounts only) AWS2 (default), AWS4
--project-id Sets project ID (applies to Google cloud accounts only) Set by storage provider
--private-key Sets private key (applies to Google cloud accounts only) Set by storage provider
--container-path Sets the path to container (applies to SFTP accounts) -
--port Sets connection port (aplies to SFTP accounts only) 22 is default value
--keep-alive Sets keep-alive parameter (applies to SFTP accounts only) true (default), false

Examples:

Amazon S3 accounts

./cbbV2 account add amazons3 --name “storage name” --access-key “access key” --secret-key “secret key” -b “bucket name" --prefix “prefix name” --ssl “true”

SFTP Accounts

./cbbV2 account add sftp --name “my SFTP” --private-key “private key value” --password “password” -c “path to container" --port "22" --keep-alive "false"" 

Add Storage Account Using Classic CLI

To request help for addAccount command, type the following:

./cbb addAccount

Amazon S3, S3-compatible, and other Access/Secret Key-type Services

The following table describes the required parameters for addAccount:

Parameter Description Value
-st Storage Type AmazonS3, AmazonS3Chinese, S3Compatible, CenturyLink, Cloudian, DreamObjects, Scality, ThinkOn, Verizon, Minio, Wasabi, Azure, OpenStack, HPCloud, Rackspace, OracleCloud, SoftLayer, Google, Backblaze, AliBabaCloud, FileSystem, SFTP
-d Display Name String
-ac Access Key String
-sk Secret Key String
-c Bucket or container String

Here's a sample command that adds an S3 account:

./cbb addAccount -st AmazonS3 -d "My S3 account" -ac "APIAIXPUW2UXRWqyFAKE" -sk "rUdioasiY4kunLB+sxKPaRsEEfQe8J6Y33huFaskFAKE" -c "dopeBucket"

Apart from required parameters, MSP360 (CloudBerry) Backup CLI provides you a number of optional parameters, including specific parameters for certain storage services:

Parameter Description Value
-bp Backup Prefix. Used for differentiation between different computers. String
-ssl Specifies if SSL should be used. yes (default) / no

Here's a sample command that adds an S3 account with all parameters:

./cbb addAccount -st AmazonS3 -d "My S3 account" -ac "APIAIXPUW2UXRWqyFAKE" -sk "rUdioasiY4kunLB+sxKPaRsEEfQe8J6Y33huFaskFAKE" -c "dopeBucket" -bp "corporateMacbook" -ssl yes

Google Cloud

Adding Google Cloud as a backup storage is a bit more tricky, as Google offers three authentication mechanisms for its cloud storage:

  • Access/Secret Key:

Adding a Google Cloud account using Access/Secret keys can be done with the help the following command:

./cbb addAccount -st Google -d "Google Cloud" -ac "yourAccessKey" -sk "yourSecretKey" -c "container"

where:

Parameter Description Value
-st StorageType Google
-d Display Name String
-ac Access Key String
-sk Secret Ket String
-c Google Cloud container String
  • OAuth 2.0 (Service Account):

Adding a Google Cloud account using OAuth 2.0 (Service Account) can be done with the help the following command:

./cbb addAccount -st Google -d "Display name" -d "Google Cloud" —pi "Project ID" -se "service account" -pk "private key path" -c "container"

where:

Parameter Description Value
-st Storage Type Google
-d Display Name String
-pi Project ID String
-se Service account email String
-pk Private key path String
-c Google Cloud container String
  • OAuth 2.0 (Installed Application):

Adding a Google Cloud account using OAuth 2.0 (Installed Application) can be done with the help the following command:

./cbb addAccount -st Google -d "Display name" -ac "authentication code" -pi "project_id" -c "container"

where:

Parameter Description Value
-st Storage Type String
-d Display Name String
-ac Authentication code that can be generated here. String
-pi Project ID String
-c Google Cloud Container String

Add SFTP Destination

To add an SFTP destination, use the following command:

./cbb addAccount -st SFTP

where:

Parameter Description Value
-d DisplayName Account name
-user User Username
-pass Password Password
-pk PrivateKey Private Key
-server ServerAddress Server address: hostname or IP
-c Container path Server container path
-port Port Server port. Default: 22
-keepAlive Possible values: **yes no** Keep the connection alive. Default value: yes
-useProxy Possible values: **yes no** Use proxy. Default: yes
bp BackupPrefix Backup prefix to differentiate backups from different computers. Optional. Default value is a computer name
--h show help -

An example of cbb addAccount command:

./ cbb addAccount -st SFTP -d -user <-pass | -pk > -server -c [-port ] [-keepAlive <yes/no>] [-bp ] [-useProxy <yes/no>]

Manage Storage Account

To list available storage accounts, execute the following command:

./cbb account -l

Synchronize Repository

Specify the following parameters to run a repository synchronization:

  • -s (-sync) Run a repository synchronization for a specified storage account
./cbb account -s "MyGoogle"

Note that the storage account name must be in quotes

Edit Storage Account

To edit storage account, use the following command:

./cbb editAccount -d "account name"

Note that the storage account name must be in quotes

Delete Storage Account

To delete an unecessary storage account, use the following command:

./cbb deleteAccount -d "My S3 storage"

Note that the storage account name must be in quotes

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