12. Managing External Repositories

In the previous chapter we looked at how one can snapshot and clone the entire application stack. Snapshots are stored on the same disks from which the storage for the PersistentVolume is allocated. Over time, as more snapshots are taken, they start consuming more and more disk space on the primary storage device. To avoid this, yet preserve as many snapshots as needed, Robin Platform can attach an external secondary storage repository onto which older snapshots are copied. This way, a user can setup a policy to retain (for example) only the last 2 snapshots on the primary storage device, and copy the older snapshots to a secondary storage repository.

Recall that Robin Platform is a highly sophisticated product, in that snapshots are not just snapshots of the PersistentVolumeClaims, but they capture all the relevant Kubernetes resources that make up that application. Hence with Robin Platform users can:

  • Backup applications and data to an external storage repository such as AWS S3, Google Cloud Storage etc.

  • Make applications and data portable across Kubernetes clusters spanning on-prem, public and hybrid cloud environments.

This is done by registering a common external Repository (or repo in short) that resides outside the Robin Platform cluster. This repository is typically an object storage system such as an Amazon S3 bucket, Google Cloud Storage (GCS) bucket or Azure Blob Storage.

The workflow to register and use the repository (abbreviated to repo) is as follows:

  1. Create / register a Repo by passing access credentials to it

  2. Attach the repo to an app

  3. Backup the app and data to the attached repo

  4. Register the same repo to a different Kubernetes cluster

  5. Export an app backup from the first cluster

  6. Import the app backup into the second cluster

  7. Browse the contents of the repo on the second cluster, pick an app, and launch it

Topics covered in this chapter:

robin repo register

Register a new external storage repository (S3, GCS, …)

robin repo unregister

Unregister a storage repo

robin repo list

List all storage repos

robin repo info

Show details about a specific storage repo

robin repo contents

Show the contents of a storage repo

robin repo purge

Purge/delete entries in a storage repo

robin repo space-reclaim

Reclaim storage in a storage repo previously used by deleted backups

robin repo status

Show status of transfers to and from a storage repo

robin repo tenant-share

Share a storage repo with one or more tenants

robin repo tenant-unshare

Stop sharing a storage repo with one or more tenants

robin repo user-share

Share a storage repo with one or more users

robin repo user-unshare

Stop sharing a repo with one or more users

robin repo list-shares

List information about tenants and users a storage repo has been shared with

12.1. Register a repo

An Amazon S3 repo is registered with the following command:

# robin repo register <reponame> s3://bucket[/path/to/folder] <credentials> <readwrite | readonly>

reponame

A name that would be assigned to the repo

bucket[/path/to/folder]

S3 bucket name and a folder within that bucket into which the application snapshots would be pushed (backed up)

<credentials>

Path to a JSON file with credentials to access the repo. The format for the file is shown below

<readwrite | readonly>

Specifies the permissions with which the repo is registered with. The ‘readwrite’ permission creates the bucket and the folder hierarchy in the repo if it doesn’t already exist. This assumes that the supplied credentials have bucket creation privileges. With the ‘readonly’ permission the repo is registered in read-only mode - it can only be used to pull already pushed application snapshots from the repo. New snapshots cannot be written to this repo

Format of the credentials file

The format of the json file passed via the <credentials> parameter for an AWS S3 repo is as follows:

{
        "aws_access_key_id" : "AKIAIC9YAL8TKCSEO43A",
        "aws_secret_access_key" : "66HXkA3mjQEbmrUo1Aw02bcdYEWjsuSPHvLEMNfZ",
}

In addition to the mandatory parameters detailed above, the following parameters may also be utilized within the credentials JSON file:

  • region: <region_name> - A string specifying the region in which to create the bucket. The default value is ‘us-east-1’. Note this option is not needed if the bucket already exists.

  • tls: [yes|no] - A boolean value indicating whether or not the HTTPs protocol should be used.

  • validate_certs: [yes|no] - A boolean value indicating whether or not certificate validation should be performed.

  • ca_file: <file_path> - A string indicating the path at which to find the CA chain certificate to verify the S3 server certificate. Note this certificate is only used when HTTPs protocol usage is enabled.

  • end_point: <end_point> - A string indicating the endpoint that should be contacted when communicating with the external repositry. This string should represent the region specific endpoint URL, details for which can be found here. Note this option is mandatory when registering a MinIO repository as a target.

AWS Access Key and Secret Keys can be obtained this way:

  1. Log in to your AWS Management Console.

  2. Click on your user name at the top right of the page.

  3. Click on the Security Credentials link from the drop-down menu.

  4. Find the Access Credentials section, and copy the latest Access Key ID.

  5. Click on the Show link in the same row, and copy the Secret Access Key.

Example:

# robin repo register mybackups s3://db-backup-bucket/mybackups aws.json readwrite

Note

The ability to register a repo is subject to Role Based Access Control (RBAC). By default, only Cluster Administrators (users having the superadmin role) have permission to do so. See the section on User Management for details on how RBAC works.

Only one repo with a given bucket name and path can be registered in a Robin Platform cluster.

To provide some users with readonly access to a repo, share the repo with them for the view operation only. For users that should have readwrite access to a repo, share the repo with them for view and push operations. In order for this to work, the repo must have been regsitered with readwrite permisison. See Share a repo with tenants for details.

A Google Cloud Storage (GCS) repo is registered with this command:

# robin repo register <reponame> gcs://bucket[/path/to/folder] <credentials> <readwrite | readonly>

reponame

A name that would be assigned to the repo

bucket[/path/to/folder]

GCS bucket name and a folder within that bucket into which the application snapshots would be pushed (backed up)

<credentials>

Path to a JSON file with credentials to access the repo. The format for the file is shown below

<readwrite | readonly>

Specifies the permissions with which the repo is registered with. The ‘readwrite’ permission creates the bucket and the folder hierarchy in the repo if it doesn’t already exist. This assumes that the supplied credentials have bucket creation privileges. With the ‘readonly’ permission the repo is registered in read-only mode - it can only be used to pull already pushed application snapshots from the repo. New snapshots cannot be written to this repo

Format of the credentials file

The format of the JSON file passed via the <credentials> parameter for a Google Cloud Storage (GCS) repo is as follows:

{
        "type": "service_account",
        "project_id": "rock-range-805623",
        "privbte_key_id": "c9fde8c819735439248147457629895ebbcc1f21",
        "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgpqkkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDXlyNg3997PJlA\nyS9doXSfX5lEpDgmk7nATyOrKQkl1D3/bWvoFMR372i0WKopj5FvLNY42jrcRzjF\nTlbJuwP4WAU652ss3qEvnUgd+mD7CcjOWd9bAA6vPJAJDo/TtTleZNQWd96y2WbT\nH/BqI9UCxdWNfsuYHQtpVViPdviizU3AxFtD6NTN/KmUX9mlM6RuF2RXAc5N/p4X\nhbeSV+rSfEgb9PA2U+fwobGzeR97V4SwK15btPpSN5twf0Wy49zGQLONFcmfwhRc\n+3r3gpPfqb+cb1xWiiD5fgO4yWYcWQXJJgUumVtVZxikc6k+9Vbko9zw20NNzRgp\nKfZdtm1jAgMBAAECggEABx+l2h4bntFWSQc3yu26UkfQ4y0/37pe4WVcCtxMwpS3\nUEbV+7Gv+mbYwVjKqpvlVNSY3YD4f+3UiOR5RIzK6UpTRep+ppoPzGh4iREMYk3k\n9PiQQkwCsDSil3IE65xp3F4die6FC3jWNFdSVNeBQtmxoD7H0GtpRJ4+0mK+fXbW\nr5f6O3WES4nOTNRonOdg9bIJJKklt3GSjtd1X5JWfGU53sbrksvy31+hL71pXCQn\nUZlkoilc3KYGnesd3KwIpxX9Pi5TldNUWuSnibvgXnDjM05PuQ0YI9VEfVR+eDfI\nBZAw2b/dmCWyU3QVAMtRbhwISmbxB33rZ133gTVN/QKBgQD5ZTZSnf7/b0YdKcAD\nP3bevN3/0s9EXO+D62MTRdrNeyb46hAcbNHmzAvgqtB74bQxiF5hs6RbmTmUpVpL\nSyCl6lqf3eMzP2gdECRLmkeZKpiWtfbPNbTefGVvbvWG6vi3E6+b/5cKPVHMLSV6\n4LIbqpVyWFWM905MXU9cgFgJDwKBgQDdTL5Yl3G/91HnyFieQ9pju6C9v1S3277k\nN10hcmldkJWludgT3WzDsNmbcAdCp+KOtQusf6KMKT5sd5ickMmAI3IZkzsgb7rS\n7AVBf3bpLG+3kOGJ4PVGKXfTEONw7hSo1UwLQxSZj1SMTtOd63pFcVea1hYQXifr\nADUrkwhObQKBgQCTb9pljTIrIEV7CCuTwChTv6QekSonaCnQ+19fDXUE9UFc9kMA\nCvUsVITRFSqbkhHXlp71c5Y+3J6x2e3/g/KRI7Lfv/WJXnrWc6yBZXveeOgscPaK\nQ13iCfiNndX5JQBXb+vo3iEU1Jt+3VGvCxc/3IjtSHuLEskfLCq2rMle0QKBgQCX\nsTJM0gGKT8KCCc/M9J/vez6Msmkk+mkYUGbzNVTKQQCDMCfQPhh+72vKY3lmlGP1\nBF7zKC5Iu0DB4xzmPU0SG/DBzS1bZ5r9V7GmmvPsk3wkrRgcheo65NPxBwOQdnIM\n5OCSW7H0LM58us/N0UG+Zhnx1cwb/h6ItIS90LSB5QKBgCwZPxhDhlKXGn3J8sLn\nuZ9WjFTBlabt8mksHpnE4xgj5BeOXee29CtaX+mPIcPEOO9ynsbizaSv7I2kBM+d\n9DZt9XiM6NcjrqtP7FCdgvZeQV0GIHjlqj2zH0UDxImGmENyHeXA1X2d0fZwzuJ+\n5dEZAfYh4QAnnPiAF5K9QFEi\n-----END PRIVATE KEY-----\n",
        "client_email": "jamesbond-cloud-repo@rock-range-805623.iam.gserviceaccount.com",
        "client_id": "1815195052297641083965",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://oauth2.googleapis.com/token",
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/jamesbond-cloud-repo%40rock-range-805623.iam.gserviceaccount.com"
}

To download a GCS Key file from the Google Cloud Platform portal:

  1. Open the IAM & Admin page in the GCP Console.

  2. Select your project and click Continue.

  3. In the left nav, click Service accounts.

  4. Look for the service account for which you wish to create a key, click the More : button in that row, and then click Create key.

  5. Select a Key type and click Create.

More details can be found here.

Example:

# robin repo register datadump gcs://datadump-bucket/dumps gcs.json readwrite

Note

The ability to register a repo is subject to Role Based Access Control (RBAC). By default, only Cluster Administrators (users having the superadmin role) have permission to do so. See the section on User Management for details on how RBAC works.

Only one repo with a given bucket name and path can be registered in a Robin Platform cluster.

To provide some users with readonly access to a repo, share the repo with them for the view operation only. For users that should have readwrite access to a repo, share the repo with them for view and push operations. In order for this to work, the repo must have been regsitered with readwrite permisison. See Share a repo with tenants for details.

An Azure Blob Storage (ABS) repo is registered with this command:

# robin repo register <reponame> azure://container[/path/to/folder] <credentials> <readwrite | readonly>

reponame

A name that would be assigned to the repo

container[/path/to/folder]

Azure container name and a folder within that bucket into which the application snapshots would be pushed (backed up)

<credentials>

Path to a JSON file with credentials to access the repo. The format for the file is shown below

<readwrite | readonly>

Specifies the permissions with which the repo is registered with. The ‘readwrite’ permission creates the container and the folder hierarchy in the repo if it doesn’t already exist. This assumes that the supplied credentials have container creation privileges. With the ‘readonly’ permission the repo is registered in read-only mode - it can only be used to pull already pushed application snapshots from the repo. New snapshots cannot be written to this repo

Format of the credentials file

The format of the JSON file passed via the <credentials> parameter for an Azure Blob Storage (ABS) repo is as follows:

{
        "azure_account_name":       "robin-demo",
        "azure_shared_access_key":  "TBNjvtyrHIeGqUzPaj3unbRat5GzfqJhwOCllrVStrMy8TYQOIfAWlM+3qaFiPON6zlJkG7u6NMIp64NlrHQTk=="
}

To create a shared access key via the Azure portal:

  1. Login to the Azure portal.

  2. Navigate to the respective storage account to create a shared access key for

  3. In the left nav, under the Settings tab click Shared access signature tab

  4. Set the right permissions, expiry times and any other necessary options for the key

  5. Click the button at the bottom of the page to generate the shared key

More details can be found here.

Example:

# robin repo register datadump azure://robin-demo/helloworld azure_creds.json readwrite  --wait

Note

The ability to register a repo is subject to Role Based Access Control (RBAC). By default, only Cluster Administrators (users having the superadmin role) have permission to do so. See the section on User Management for details on how RBAC works.

Only one repo with a given bucket name and path can be registered in a Robin Platform cluster.

To provide some users with readonly access to a repo, share the repo with them for the view operation only. For users that should have readwrite access to a repo, share the repo with them for view and push operations. In order for this to work, the repo must have been regsitered with readwrite permisison. See Share a repo with tenants for details.

Registers a repo from Robin such that it can be used to backup application snapshots.

End Point: /api/v3/robin_server/storage_repo/

Method: POST

URL Parameters: None

Data Parameters:

  • name: <repo_name> - This mandatory field within the payload specifies the name of the repo to be added.

  • repo_type: <repo_type> - This mandatory field within the payload specifies the type of the repo to be added. Valid values include: ‘AWS_S3’, ‘GCS’.

  • bucket: <bucket_name> - This mandatory field within the payload specifies the name of the respective cloud bucket to be associated with the repo.

  • path: <path> - This mandatory field within the payload specifies the path within the bucket at which the backed up data will be stored.

  • permissions: <permissions> - This mandatory field within the payload specifies the permissions with which the repo is registered with. Valid values include: ‘readwrite’, ‘readonly’.

  • backup_target: 1 - This mandatory field within the payload specifies that backups are enabled for this repo.

  • <cred_key>: <cred_value> - Each key value pair within the respective credential JSONs defined for the given repo type should be specified in a similar manner in the payload.

Note

For GCS repos, instead of specifying each key value pair within the credential file as its own field within the payload one must specify the credentials attribute within the payload with the value being the JSON equivalent of the GCS credentials file.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error), 409 (Duplicate Resource Error)

Example Response:

Output
{
   "jobid":546
}

12.2. Unregister a repo

A registered repo can be unregistered by issuing the following command:

# robin repo unregister <reponame>
                        --force

reponame

A name that would be assigned to the repo

--force

Force removal of a repo regardless of backups cataloged

Example:

# robin repo unregister demo-backup --wait
Job:  719 Name: StorageRepoRemove    State: PROCESSED       Error: 0
Job:  719 Name: StorageRepoRemove    State: COMPLETED       Error: 0

Note

The ability to unregister a repo is subject to Role Based Access Control (RBAC). By default, only Cluster Administrators (users having the superadmin role) have permission to do so. See the section on User Management for details on how RBAC works.

There are a number of conditions that will prevent a repo from being unregistered:

  • A repo cannot be unregistered if it has attached applications (see robin app attach-repo command). Use the robin app detach-repo command to detach each app before running the robin repo unregister command. See documentation for robin repo detach to understand what happens to an app’s data when it is detached from the repo.

  • A repo cannot be unregistered if there are any backup entries in the repo’s catalog. All backup entries must be purged from the repo’s catalog before running the robin repo unregister command. Backup entries can be purged from the repo catalog only, or they can be purged from the catalog and the external repository. See documentation for robin repo purge and robin backup delete for details.

  • A repo cannot be unregistered if it is shared with any users (see robin repo share command). Use the robin repo unshare command to remove any user shares before running the robin repo unregister command.

Unregisters a repo from Robin such that it cannot be used until it is registered again.

End Point: /api/v3/robin_server/storage_repo/<repo_name>

Method: DELETE

URL Parameters: None

Data Parameters:

  • force: true - Utilizing this parameter results in the forceful removal of a repo regardless of the backups cataloged.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 404 (Not Found Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":717
}

12.3. List repos

Repos registered with a Robin Platform cluster can be listed like this:

# robin repo list --full

--full

Show additional information about each repo (e.g., tenant and user shares)

Example 1:

# robin repo list

+----------+------+----------------------+--------------+-----------------+--------+-------------+
| Name     | Type | Owner/Tenant         | BackupTarget | Bucket          | Path   | Permissions |
+----------+------+----------------------+--------------+-----------------+--------+-------------+
| datadump | GCS  | robin/Administrators | 1            | datadump-bucket | dumps/ | readwrite   |
+----------+------+----------------------+--------------+-----------------+--------+-------------+

Example 2: Repo listing with additional information

# robin repo list --full
+----------+------+----------------------+--------------+-----------------------+-----------+-------------+
| Name     | Type | Owner/Tenant         | BackupTarget | Bucket                | Path      | Permissions |
+----------+------+----------------------+--------------+-----------------------+-----------+-------------+
| testrepo | GCS  | robin/Administrators | 1            | testbucket-1029384756 | dev/test/ | readwrite   |
+----------+------+----------------------+--------------+-----------------------+-----------+-------------+
Tenant Shares: ALL_TENANTS
User Shares:
t1:admin1: update, delete, push, scan, purge, reclaim, share
t1:all_tenant_users: view

Note

The ability to view repos is subject to Role Based Access Control (RBAC). Cluster Administrators (users having the superadmin role) are able to view all registered repos in a cluster. Cluster users (users having the user role), on the other hand, are only able to view repos that have been explicitly shared with them, or that have been shared with all cluster users (see Share a repo with tenants for details). Cluster users are also able to view any repos they register or create, but they must first be assigned the capability to do so. See the section on User Management for details on how RBAC works.

Returns information on all repos registered with a cluster including details on the associated bucket, path and read-write permissions.

End Point: /api/v3/robin_server/storage_repo?sub-command=list

Method: GET

URL Parameters: None

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error)

Example Response:

Output
{
   "items":[
      {
         "tenant":"Administrators",
         "backup_target":1,
         "username":"robin",
         "scan_end":1599634520,
         "user_shares":{

         },
         "permissions":"readwrite",
         "repo_type":"GCS",
         "path":"my-appyx-bucket\/",
         "user_id":3,
         "repo_params":"<REDACTED>",
         "repo_id":2,
         "scan_diff":{
            "added":0,
            "removed":0
         },
         "name":"app-repofpom",
         "share_with_all_tenants":false,
         "scan_start":1599634519,
         "tenant_shares":{

         },
         "scan_state":"SUCCESS",
         "scan_error":"-",
         "bucket":"ramendra",
         "tenant_id":1
      },
      {
         "tenant":"Administrators",
         "backup_target":1,
         "username":"robin",
         "scan_end":1599641890,
         "user_shares":{

         },
         "permissions":"readwrite",
         "repo_type":"GCS",
         "path":"my-appzu-bucket\/",
         "user_id":3,
         "repo_params":"<REDACTED>",
         "repo_id":6,
         "scan_diff":{
            "added":0,
            "removed":0
         },
         "name":"app-repotmcj",
         "share_with_all_tenants":false,
         "scan_start":1599641890,
         "tenant_shares":{

         },
         "scan_state":"SUCCESS",
         "scan_error":"-",
         "bucket":"ramendra",
         "tenant_id":1
      }
   ]
}

12.4. Get information about a specific repo

In order to attain details of a specific repo issue the following command:

# robin repo info <reponame>

reponame

Name of the repo

Example:

# robin repo info datadump

Name                   : datadump
Type                   : GCS
Bucket                 : datadump-bucket
Path                   : dumps/
Permissions            : readwrite

Scan Details
-------
Scan State             : SUCCESS
Start Time             : 2019-04-08 16:05:35
End Time               : 2019-04-08 16:05:35
Time Taken             : 0s
Scan Error             : -
Scan Diff              : {'removed': 0, 'added': 0}

Apps attached: 1
        helm/mydb

Note

The ability to view information about a specific repo is subject to Role Based Access Control (RBAC). Cluster administrators (users having the superadmin role) are able to view information about all registered repos in a cluster. Cluster users (users having the user role), on the other hand, are only able to view information about repos that have been explicitly shared with them or that have been shared with all cluster users (see Share a repo with tenants for details). See the section on User Management for details on how RBAC works.

Returns detailed information about a repo, such as the permissions associated with the repo, details about the last run scan and the applications attached to the repo.

End Point: /api/v3/robin_server/storage_repo/<repo_name>?sub-command=info

Method: GET

URL Parameters: None

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 404 (Not Found Error)

Example Response:

Output
{
   "apps":[
      "helm\/my-appyx",
      "flexapp\/my-import1ry",
      "robin\/demo"
   ],
   "tenant":"Administrators",
   "backup_target":1,
   "username":"robin",
   "scan_end":1599634520,
   "user_shares":{

   },
   "permissions":"readwrite",
   "repo_type":"GCS",
   "path":"my-appyx-bucket\/",
   "user_id":3,
   "repo_params":"<REDACTED>",
   "repo_id":2,
   "scan_diff":{
      "added":0,
      "removed":0
   },
   "bucket":"ramendra",
   "name":"app-repofpom",
   "share_with_all_tenants":false,
   "scan_start":1599634519,
   "tenant_shares":{

   },
   "scan_error":"-",
   "scan_state":"SUCCESS",
   "tenant_id":1
}

12.5. List the contents of a repo (Browse Backup Catalog)

To browse the contents of a repo (a.k.a. browsing the backup catalog) use the following command:

# robin repo contents <reponame>
                      --zoneid <zoneid>
                      --backupid <backupid>
                      --refresh
                      --managed

reponame

Name of the repo to browse

--zoneid <zoneid>

The zone ID to use when scanning repo contents (disaster recovery only)

--backup_id <backupid>

The backup Id to use when scanning repo contents (disaster recovery only)

--refresh

When specified the repo would be scanned again to build the catalog

--managed

Take ownership of an orphaned backup in an external storage repo (disaster recovery only)

Example:

# robin repo contents datadump --refresh

+----------------------------------+------------+------+------------+
| BackupID                         | ZoneID     | App  | Snapshot   |
+----------------------------------+------------+------+------------+
| 5eccc5285a5211e9a1c3417886f14cc5 | 1554764031 | mydb | mydb_snap1 |
+----------------------------------+------------+------+------------+

Note

The ability to view the contents of a repo (view the repo catalog) is subject to Role Based Access Control (RBAC). By default, only Cluster Administrators (users having the superadmin role) have permission to do so. Cluster Users can use the robin backup list command to view information about app backups that are stored in a repo, at least for those backups they have view access to. See the section on User Management for details on how RBAC works.

In general, it should not be necessary to issue a robin repo contents command with the --refresh command line argument. All backups pushed to a repo from a cluster will automatically get added to the repo’s catalog.

To perform disaster recovery (recover orphaned backups from an external storage repo), issue the robin repo contents command with the --zoneid <zoneid> command line argument. This will allow all backups from the destroyed cluster to be added to the repo catalog in the local Robin Platform cluster. If only a single backup is required, then include the --backupid <backupid> command line option as well. Note that recovered backups are functionally identical to backups that have been imported from another cluster. To take ownership of the recovered backups (have the ability to issue a robin repo purge command on them), include the --managed command line option.

Returns all of the backups contained within the repo.

End Point: /api/v3/robin_server/storage_repo/<repo_name>?sub-command=list

Method: GET

URL Parameters: None

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 404 (Not Found Error)

Example Response:

Output
{
   "items":[
      {
         "zoneid":1602807544,
         "kind":"robin",
         "tenant_shares":{

         },
         "appname":"centos1",
         "bkpid":"5c3c2e9e18a311ebbc7fe3b10b7c043d",
         "snapname":"centos1_snap1",
         "appid":14,
         "repo_id":1,
         "spec":"{\"clone\":\"enabled\",\"rpoolid\":1,\"snapname\":\"snap1\",\"auto_relocate\":true,\"parent_last_known_state\":6,\"version\":\"7\",\"rpool\":\"default\",\"bundleid\":\"9\",\"zoneid\":\"1602807544\",\"tenant\":\"Administrators\",\"namespace\":\"t001-u000003\",\"enable_hooklogs\":true,\"name\":\"centos1_snap1\",\"snapshot\":\"enabled\",\"bundle_path\":\"\\\/usr\\\/local\\\/robin\\\/collections\\\/file-collection-1602783389182\\\/1603478511563\\\/centos-7\",\"id\":14,\"enable_metrics\":true,\"restart_num\":15,\"planid\":19,\"stordriver\":\"das\",\"pvcpolicy\":\"create\",\"content_id\":\"4f84f8aef3e7a66e7aabbd033ec8872c\",\"roles\":[{\"multinode_min\":1,\"name\":\"server\",\"volume_groups\":[],\"image\":{\"engine\":\"docker\",\"init_mode\":false,\"name\":\"robinsys\\\/centos\",\"entrypoint\":\"entry.sh\",\"registry_hostname\":\"\",\"version\":\"7\",\"registry_port\":\"\",\"registry_name\":\"Docker Hub\"},\"skip_headless_service\":false,\"display_name\":\"server\",\"multinode\":true,\"scaleout\":\"enabled\",\"multinode_max\":256,\"qgroups\":{\"block\":{\"rd_min_iops\":0,\"wr_max_iops\":2000000,\"wr_weight\":1,\"wr_min_window\":500,\"rd_min_window\":500,\"priority\":1,\"rd_weight\":1,\"enabled\":false,\"rd_max_iops\":2000000,\"wr_min_iops\":0},\"root_fs\":{\"rd_min_iops\":0,\"wr_max_iops\":2000000,\"wr_weight\":1,\"wr_min_window\":500,\"rd_min_window\":500,\"priority\":1,\"rd_weight\":1,\"enabled\":false,\"rd_max_iops\":2000000,\"wr_min_iops\":0},\"data\":{\"rd_min_iops\":0,\"wr_max_iops\":2000000,\"wr_weight\":1,\"wr_min_window\":500,\"rd_min_window\":500,\"priority\":1,\"rd_weight\":1,\"enabled\":false,\"rd_max_iops\":2000000,\"wr_min_iops\":0}},\"vnodes\":[{\"service_ports\":[],\"pod_ns\":\"t001-u000003\",\"allocated_host_type\":\"physical\",\"allocated\":{\"nodeid\":1,\"zonename\":\"default\",\"nodename\":\"cscale-82-35\",\"zoneid\":1602807544},\"bundleid\":\"9\",\"appname\":\"centos1\",\"enable_portmapping\":true,\"role_name\":\"server\",\"cm_keys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDzPipV+OckDp9quevyL6fmgABfwpnOr+dILfTC71SQnqUf7s47MscK2pjeQkuy2Nni7qIND\\\/uKSrqvWf2Dlh1+prmPl4NqyfwcQMpoycb55duVT2E\\\/N+JcsLrqG73BylXsEho0312cL2GgbVhBpna75maLrUkn3cSatki37Hj8FtefcbuF8yBxyq4ynYI+VLcnIhZRA1j1BE7Ooa8tce0fInRkjRc006ZTEko003a+VC8Kw63hJYOfa69mv7sQHoLAkjjy9JiXQC4VJk6DTa5zV3PjVGmzwlsnesA+Gn1xLska9bQTfti1MOOjkLlPQTE6JQ+mX+wcuUP8TEzZB625 root@cscale-82-35\"],\"name\":\"centos1.server.01\",\"vnodeid\":45,\"volume_groups\":[{\"replicas\":1,\"media\":\"HDD\",\"rpoolid\":1,\"name\":\"centos1.server.01.72.1.3ab981b0-7783-43d7-8b1b-2c79f8b11220\",\"volumes\":[\"centos1.server.01.data.1.83e6d0ea-9e24-4a19-956f-44a3094d6c8f\"],\"device_sets\":[{\"devices\":[{\"type\":\"HDD\",\"devpath\":\"\\\/dev\\\/disk\\\/by-id\\\/scsi-360022480b410ddebc69ecdea69c2bf34\",\"stormgr_id\":4,\"pused\":4529848320,\"aslices\":59,\"host\":\"cscale-82-35.robinsystems.com\",\"tags\":{},\"wwn\":\"0x360022480b410ddebc69ecdea69c2bf34\",\"allocated_slices\":2,\"psize\":107374182400,\"max_volumes_per_disk\":10,\"slices\":77,\"score\":67,\"max_latency_sensitive_vols_per_disk\":2,\"max_throughput_intensive_vols_per_disk\":1,\"write_unit\":4096,\"role\":\"Storage\",\"protected\":0,\"hostname\":\"cscale-82-35.robinsystems.com\",\"reattachable\":0,\"state\":\"READY\",\"capacity\":107374182400}],\"stormgr_id\":30,\"name\":\"centos1.server.01.72.1.3ab981b0-7783-43d7-8b1b-2c79f8b11220.0.f177eb38-7e97-4444-937c-f89270e4d344\"}],\"layout\":\"round-robin\",\"stormgr_id\":29},{\"replicas\":1,\"media\":\"HDD\",\"rpoolid\":1,\"name\":\"centos1.server.01.72.1.232a8874-c087-4a84-98b9-b7057219456e\",\"volumes\":[\"centos1.server.01.block.1.7e03950f-936c-42f5-bf34-89f435467266\"],\"device_sets\":[{\"devices\":[{\"type\":\"HDD\",\"devpath\":\"\\\/dev\\\/disk\\\/by-id\\\/scsi-360022480b410ddebc69ecdea69c2bf34\",\"stormgr_id\":4,\"pused\":4529848320,\"aslices\":59,\"host\":\"cscale-82-35.robinsystems.com\",\"tags\":{},\"wwn\":\"0x360022480b410ddebc69ecdea69c2bf34\",\"allocated_slices\":2,\"psize\":107374182400,\"max_volumes_per_disk\":10,\"slices\":77,\"score\":67,\"max_latency_sensitive_vols_per_disk\":2,\"max_throughput_intensive_vols_per_disk\":1,\"write_unit\":4096,\"role\":\"Storage\",\"protected\":0,\"hostname\":\"cscale-82-35.robinsystems.com\",\"reattachable\":0,\"state\":\"READY\",\"capacity\":107374182400}],\"stormgr_id\":31,\"name\":\"centos1.server.01.72.1.232a8874-c087-4a84-98b9-b7057219456e.0.981d5ad0-671f-4b66-84b5-6876939b1f53\"}],\"layout\":\"round-robin\",\"stormgr_id\":30},{\"replicas\":1,\"media\":\"HDD\",\"rpoolid\":1,\"name\":\"centos1.server.01.72.1.fada19fc-5576-4f0f-a1e4-d501dd69b672\",\"volumes\":[\"centos1.server.01.root_fs.1.fc7c7eff-8fce-4ec1-977c-f3f8a9bf278e\"],\"device_sets\":[{\"devices\":[{\"type\":\"HDD\",\"devpath\":\"\\\/dev\\\/disk\\\/by-id\\\/scsi-360022480843cee146f0d03f0d0bafa89\",\"stormgr_id\":3,\"pused\":0,\"aslices\":0,\"host\":\"cscale-82-35.robinsystems.com\",\"tags\":{},\"wwn\":\"0x360022480843cee146f0d03f0d0bafa89\",\"allocated_slices\":2,\"psize\":107374182400,\"max_volumes_per_disk\":10,\"slices\":77,\"score\":100,\"max_latency_sensitive_vols_per_disk\":2,\"max_throughput_intensive_vols_per_disk\":1,\"write_unit\":4096,\"role\":\"Storage\",\"protected\":0,\"hostname\":\"cscale-82-35.robinsystems.com\",\"reattachable\":0,\"state\":\"READY\",\"capacity\":107374182400}],\"stormgr_id\":32,\"name\":\"centos1.server.01.72.1.fada19fc-5576-4f0f-a1e4-d501dd69b672.0.30776f5e-bf20-4057-82bc-274f03006ca9\"}],\"layout\":\"round-robin\",\"stormgr_id\":31}],\"vnodehooks\":{\"postcreate\":\"bash postcreate.sh\"},\"service_uids\":[],\"role\":\"server\",\"utime\":1603837273,\"ctime\":1603837273,\"cpu\":{\"max\":1,\"min\":0,\"nonisol\":true,\"reserve\":false},\"state\":\"STARTED\",\"pod_name\":\"centos1-server-01\",\"root_fs\":\"\\\/usr\\\/local\\\/robin\\\/instances\\\/centos1-server-01.t001-u000003.svc.cluster.local\",\"restart_on_qoscfg\":true,\"allocated_host_public_hostname\":\"cscale-82-35.robinsystems.com\",\"mem\":{\"hugepages_1g\":0,\"hugepages_2m\":0,\"size\":209715200},\"rpoolid\":1,\"storage\":[{\"type\":\"data\",\"faultdomain\":\"host\",\"media\":\"HDD\",\"replication\":1,\"snapname\":\"snap1\",\"encryption\":\"none\",\"fstype\":\"ext4\",\"allocated\":{\"media\":72,\"backupid\":1,\"replication\":1,\"snapname\":\"snap1\",\"volumeid\":\"30\",\"qgroupid\":31,\"multinode_mounting\":false,\"params\":{},\"protection\":0,\"appname\":\"default\",\"priority\":2,\"vtype\":0,\"partitions\":0,\"snapshot_space_limit\":214748364,\"current_snapshotid\":1,\"next_backupid\":1,\"block_size\":4096,\"name\":\"centos1.server.01.data.1.83e6d0ea-9e24-4a19-956f-44a3094d6c8f\",\"resource_poolid\":1,\"appid\":1,\"grpid\":29,\"stordriver\":{\"type\":\"das\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"protection\":\"0\"},\"genkey\":1603837254520070,\"current_snapshot\":\"active_snap\",\"size\":1073741824,\"slice_size\":1073741824,\"next_snapshotid\":2,\"compression\":0},\"blocksize\":4096,\"path\":\"\\\/data\",\"size\":1073741824,\"protection\":0,\"snapshot_space_limit\":214748364,\"workload\":0,\"disk_tags\":{},\"vol_ns\":\"t001-u000003\",\"name\":\"centos1.server.01.data.1.83e6d0ea-9e24-4a19-956f-44a3094d6c8f\",\"pvcpolicy\":\"create\",\"volgrp_name\":\"centos1.server.01.72.1.3ab981b0-7783-43d7-8b1b-2c79f8b11220\",\"stordriver\":{\"type\":\"das\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"protection\":\"0\"},\"k8s_name\":\"centos1-server-01-data-1-83e6d0ea\",\"lvm_type\":\"None\",\"snap_reserved\":20,\"layout\":\"round-robin\",\"lvm_vol_count\":\"0\",\"compression\":\"0\"},{\"type\":\"block\",\"faultdomain\":\"host\",\"media\":\"HDD\",\"replication\":1,\"snapname\":\"snap1\",\"encryption\":\"none\",\"fstype\":\"raw\",\"allocated\":{\"media\":72,\"backupid\":1,\"replication\":1,\"snapname\":\"snap1\",\"volumeid\":\"29\",\"qgroupid\":29,\"multinode_mounting\":false,\"params\":{},\"protection\":0,\"appname\":\"default\",\"priority\":2,\"vtype\":0,\"partitions\":0,\"snapshot_space_limit\":214748364,\"current_snapshotid\":1,\"next_backupid\":1,\"block_size\":4096,\"name\":\"centos1.server.01.block.1.7e03950f-936c-42f5-bf34-89f435467266\",\"resource_poolid\":1,\"appid\":1,\"grpid\":30,\"stordriver\":{\"type\":\"das\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"protection\":\"0\"},\"genkey\":1603837254473811,\"current_snapshot\":\"active_snap\",\"size\":1073741824,\"slice_size\":1073741824,\"next_snapshotid\":2,\"compression\":0},\"blocksize\":4096,\"path\":\"\\\/dev\\\/rda\",\"size\":1073741824,\"protection\":0,\"snapshot_space_limit\":214748364,\"workload\":0,\"disk_tags\":{},\"vol_ns\":\"t001-u000003\",\"name\":\"centos1.server.01.block.1.7e03950f-936c-42f5-bf34-89f435467266\",\"pvcpolicy\":\"create\",\"volgrp_name\":\"centos1.server.01.72.1.232a8874-c087-4a84-98b9-b7057219456e\",\"stordriver\":{\"type\":\"das\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"protection\":\"0\"},\"k8s_name\":\"centos1-server-01-block-1-7e03950f\",\"lvm_type\":\"None\",\"snap_reserved\":20,\"layout\":\"round-robin\",\"lvm_vol_count\":\"0\",\"compression\":\"0\"},{\"type\":\"root_fs\",\"faultdomain\":\"host\",\"media\":\"HDD\",\"replication\":1,\"snapname\":\"snap1\",\"encryption\":\"none\",\"fstype\":\"xfs\",\"allocated\":{\"media\":72,\"backupid\":1,\"replication\":1,\"snapname\":\"snap1\",\"volumeid\":\"31\",\"qgroupid\":30,\"multinode_mounting\":false,\"params\":{},\"protection\":0,\"appname\":\"default\",\"priority\":2,\"vtype\":0,\"partitions\":0,\"snapshot_space_limit\":214748364,\"current_snapshotid\":1,\"next_backupid\":1,\"block_size\":4096,\"name\":\"centos1.server.01.root_fs.1.fc7c7eff-8fce-4ec1-977c-f3f8a9bf278e\",\"resource_poolid\":1,\"appid\":1,\"grpid\":31,\"stordriver\":{\"type\":\"das\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"protection\":\"0\"},\"genkey\":1603837254525619,\"current_snapshot\":\"active_snap\",\"size\":1073741824,\"slice_size\":1073741824,\"next_snapshotid\":2,\"compression\":0},\"blocksize\":4096,\"path\":\"\\\/\",\"size\":1073741824,\"protection\":0,\"snapshot_space_limit\":214748364,\"workload\":0,\"disk_tags\":{},\"vol_ns\":\"t001-u000003\",\"name\":\"centos1.server.01.root_fs.1.fc7c7eff-8fce-4ec1-977c-f3f8a9bf278e\",\"pvcpolicy\":\"create\",\"volgrp_name\":\"centos1.server.01.72.1.fada19fc-5576-4f0f-a1e4-d501dd69b672\",\"stordriver\":{\"type\":\"das\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"protection\":\"0\"},\"k8s_name\":\"centos1-server-01-root-fs-1-fc7c7eff\",\"lvm_type\":\"None\",\"snap_reserved\":20,\"layout\":\"round-robin\",\"lvm_vol_count\":\"0\",\"compression\":\"0\"}],\"disable_vnodehooks\":false,\"image\":{\"engine\":\"docker\",\"init_mode\":false,\"name\":\"robinsys\\\/centos\",\"entrypoint\":\"entry.sh\",\"registry_hostname\":\"\",\"version\":\"7\",\"registry_port\":\"\",\"registry_name\":\"Docker Hub\"},\"allocated_host_public_ip\":\"10.9.82.35\",\"k8s_provider\":\"robin\",\"env\":{\"DOCKER_OPTS\":{\"value\":\"-v \\\/sys\\\/fs\\\/cgroup:\\\/sys\\\/fs\\\/cgroup --cap-add=SYS_ADMIN\",\"type\":\"text\"},\"ENABLE_SSH\":{\"value\":true,\"type\":\"boolean\"},\"allocated\":{\"ROBINHOST_TAG_KUBERNETES.IO-ARCH\":\"amd64\",\"K8S_NODE\":\"cscale-82-35\",\"ROBINHOST_TAG_ROBINRPOOL\":\"default\",\"ROBINHOST\":\"cscale-82-35.robinsystems.com\",\"DOCKER_OPTS\":\"-v \\\/sys\\\/fs\\\/cgroup:\\\/sys\\\/fs\\\/cgroup --cap-add=SYS_ADMIN\",\"ENABLE_SSH\":true,\"POD_NAME\":\"centos1-server-01\",\"ROBINHOST_TAG_KUBERNETES.IO-OS\":\"linux\",\"ROOT_PASSWORD\":\"\",\"POD_NS\":\"t001-u000003\"},\"ROOT_PASSWORD\":{\"value\":\"\",\"type\":\"password\"}},\"engine\":\"docker\",\"enable_hooklogs\":true,\"calico_inuse\":true,\"appid\":14,\"sidecar_info\":{\"hugepages_2m\":0,\"cpu\":0,\"mem\":0,\"hugepages_1g\":0,\"containers\":[],\"gpu\":0},\"numa_allocations\":{\"0\":{\"non_isol_cores_used\":1,\"isol_shared_cores_used\":0,\"isol_dedicated_cores_used\":0,\"mem_used\":209715200,\"gpu_used\":0,\"hugepages_2m_used\":0,\"hugepages_1g_used\":0}},\"network\":[{\"subnet\":\"172.21.0.0\",\"interfaces\":1,\"name\":\"robin-default\",\"allocated_netmask\":\"255.255.0.0\",\"allocated_by\":\"system\",\"allocated_names\":[\"eth0\"],\"allocated_ip\":\"172.21.16.145\",\"allocated_prefix\":16,\"ippool\":\"robin-default\",\"driver\":\"calico\"}],\"id\":45,\"enable_metrics\":true,\"restart_num\":15,\"gpu\":{\"type\":\"\",\"max\":0,\"count\":0},\"hostname\":\"centos1-server-01.t001-u000003.svc.cluster.local\",\"allocated_host\":\"cscale-82-35.robinsystems.com\",\"bundle_path\":\"\\\/usr\\\/local\\\/robin\\\/collections\\\/file-collection-1602783389182\\\/1603478511563\\\/centos-7\",\"host_ip\":\"172.21.16.145\",\"hosttags\":{\"kubernetes.io\\\/os\":[\"linux\"],\"kubernetes.io\\\/arch\":[\"amd64\"],\"robin.io\\\/robinrpool\":[\"default\"]},\"bundle_object_id\":\"4f84f8aef3e7a66e7aabbd033ec8872c\",\"vnodehookargs\":{\"postcreate\":[]}}],\"restart_on_qoscfg\":true,\"elastic_ip_enabled\":false}],\"master_name\":\"centos1\",\"app_ns\":\"t001-u000003\",\"parentid\":14,\"bundle_object_id\":\"4f84f8aef3e7a66e7aabbd033ec8872c\",\"username\":\"robin\",\"desc\":\"No description was given.\",\"from_template\":null}",
         "managed":true,
         "create_time":1603837547,
         "username":"robin",
         "user_id":3,
         "repo_name":"repo1",
         "imported":false,
         "backup_id":1,
         "tenant_id":1,
         "user_shares":{

         },
         "tenant":"Administrators",
         "path":"\/1602807544\/centos1_14\/5c3c2e9e18a311ebbc7fe3b10b7c043d\/appconfig\/backup_metadata.json",
         "backupname":"bc1"
      },
      {
         "zoneid":1602807544,
         "kind":"robin",
         "tenant_shares":{

         },
         "appname":"centos2",
         "bkpid":"b104bbd41ee011ebb9b5db62eaa9704d",
         "snapname":"centos2_snap1",
         "appid":17,
         "repo_id":1,
         "spec":"{\"enable_metrics\":true,\"id\":17,\"clone\":\"enabled\",\"enable_hooklogs\":true,\"username\":\"robin\",\"content_id\":\"4f84f8aef3e7a66e7aabbd033ec8872c\",\"bundleid\":\"9\",\"tenant\":\"Administrators\",\"snapname\":\"snap1\",\"rpoolid\":1,\"snapshot\":\"enabled\",\"bundle_path\":\"\\\/usr\\\/local\\\/robin\\\/collections\\\/file-collection-1602783389182\\\/1603478511563\\\/centos-7\",\"roles\":[{\"image\":{\"init_mode\":false,\"registry_hostname\":\"\",\"engine\":\"docker\",\"entrypoint\":\"entry.sh\",\"registry_port\":\"\",\"name\":\"robinsys\\\/centos\",\"registry_name\":\"Docker Hub\",\"version\":\"7\"},\"display_name\":\"server\",\"vnodes\":[{\"enable_metrics\":true,\"image\":{\"init_mode\":false,\"registry_hostname\":\"\",\"engine\":\"docker\",\"entrypoint\":\"entry.sh\",\"registry_port\":\"\",\"name\":\"robinsys\\\/centos\",\"registry_name\":\"Docker Hub\",\"version\":\"7\"},\"k8s_provider\":\"robin\",\"id\":46,\"host_ip\":\"172.21.29.89\",\"appname\":\"centos2\",\"utime\":1603845179,\"root_fs\":\"\\\/usr\\\/local\\\/robin\\\/instances\\\/centos2-server-01.t001-u000003.svc.cluster.local\",\"bundleid\":\"9\",\"cm_keys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDzPipV+OckDp9quevyL6fmgABfwpnOr+dILfTC71SQnqUf7s47MscK2pjeQkuy2Nni7qIND\\\/uKSrqvWf2Dlh1+prmPl4NqyfwcQMpoycb55duVT2E\\\/N+JcsLrqG73BylXsEho0312cL2GgbVhBpna75maLrUkn3cSatki37Hj8FtefcbuF8yBxyq4ynYI+VLcnIhZRA1j1BE7Ooa8tce0fInRkjRc006ZTEko003a+VC8Kw63hJYOfa69mv7sQHoLAkjjy9JiXQC4VJk6DTa5zV3PjVGmzwlsnesA+Gn1xLska9bQTfti1MOOjkLlPQTE6JQ+mX+wcuUP8TEzZB625 root@cscale-82-35\"],\"vnodehooks\":{\"postcreate\":\"bash postcreate.sh\"},\"rpoolid\":1,\"enable_portmapping\":true,\"state\":\"STARTED\",\"engine\":\"docker\",\"allocated_host_type\":\"physical\",\"calico_inuse\":true,\"storage\":[{\"vol_ns\":\"t001-u000003\",\"snap_reserved\":20,\"allocated\":{\"partitions\":0,\"volumeid\":\"33\",\"appname\":\"default\",\"name\":\"centos2.server.01.data.1.d1392bcc-bc57-4665-9cdd-8b8511d2fed8\",\"priority\":2,\"size\":1073741824,\"replication\":1,\"block_size\":4096,\"stordriver\":{\"protection\":\"0\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"type\":\"das\"},\"media\":72,\"next_snapshotid\":2,\"current_snapshot\":\"active_snap\",\"compression\":0,\"qgroupid\":34,\"resource_poolid\":1,\"snapname\":\"snap1\",\"slice_size\":1073741824,\"grpid\":32,\"backupid\":1,\"vtype\":0,\"next_backupid\":1,\"current_snapshotid\":1,\"appid\":1,\"protection\":0,\"params\":{},\"multinode_mounting\":false,\"genkey\":1603845154607588,\"snapshot_space_limit\":214748364},\"size\":1073741824,\"replication\":1,\"snapname\":\"snap1\",\"layout\":\"round-robin\",\"stordriver\":{\"protection\":\"0\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"type\":\"das\"},\"media\":\"HDD\",\"compression\":\"0\",\"k8s_name\":\"centos2-server-01-data-1-d1392bcc\",\"lvm_vol_count\":\"0\",\"lvm_type\":\"None\",\"encryption\":\"none\",\"blocksize\":4096,\"type\":\"data\",\"fstype\":\"ext4\",\"name\":\"centos2.server.01.data.1.d1392bcc-bc57-4665-9cdd-8b8511d2fed8\",\"workload\":0,\"path\":\"\\\/data\",\"snapshot_space_limit\":214748364,\"disk_tags\":{},\"pvcpolicy\":\"create\",\"volgrp_name\":\"centos2.server.01.72.1.a8fa2791-408f-4d6e-bc44-eaceb9742b0b\",\"faultdomain\":\"host\",\"protection\":0},{\"vol_ns\":\"t001-u000003\",\"snap_reserved\":20,\"allocated\":{\"partitions\":0,\"volumeid\":\"34\",\"appname\":\"default\",\"name\":\"centos2.server.01.block.1.3e22dd9d-59ed-412a-9aa5-18e492e7eb2c\",\"priority\":2,\"size\":1073741824,\"replication\":1,\"block_size\":4096,\"stordriver\":{\"protection\":\"0\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"type\":\"das\"},\"media\":72,\"next_snapshotid\":2,\"current_snapshot\":\"active_snap\",\"compression\":0,\"qgroupid\":32,\"resource_poolid\":1,\"snapname\":\"snap1\",\"slice_size\":1073741824,\"grpid\":33,\"backupid\":1,\"vtype\":0,\"next_backupid\":1,\"current_snapshotid\":1,\"appid\":1,\"protection\":0,\"params\":{},\"multinode_mounting\":false,\"genkey\":1603845154639196,\"snapshot_space_limit\":214748364},\"size\":1073741824,\"replication\":1,\"snapname\":\"snap1\",\"layout\":\"round-robin\",\"stordriver\":{\"protection\":\"0\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"type\":\"das\"},\"media\":\"HDD\",\"compression\":\"0\",\"k8s_name\":\"centos2-server-01-block-1-3e22dd9d\",\"lvm_vol_count\":\"0\",\"lvm_type\":\"None\",\"encryption\":\"none\",\"blocksize\":4096,\"type\":\"block\",\"fstype\":\"raw\",\"name\":\"centos2.server.01.block.1.3e22dd9d-59ed-412a-9aa5-18e492e7eb2c\",\"workload\":0,\"path\":\"\\\/dev\\\/rda\",\"snapshot_space_limit\":214748364,\"disk_tags\":{},\"pvcpolicy\":\"create\",\"volgrp_name\":\"centos2.server.01.72.1.ecd4456a-798a-4860-980c-0d04686b0fb8\",\"faultdomain\":\"host\",\"protection\":0},{\"vol_ns\":\"t001-u000003\",\"snap_reserved\":20,\"allocated\":{\"partitions\":0,\"volumeid\":\"32\",\"appname\":\"default\",\"name\":\"centos2.server.01.root_fs.1.5ad0f238-eef0-4b2f-ac5a-9d7712541602\",\"priority\":2,\"size\":1073741824,\"replication\":1,\"block_size\":4096,\"stordriver\":{\"protection\":\"0\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"type\":\"das\"},\"media\":72,\"next_snapshotid\":2,\"current_snapshot\":\"active_snap\",\"compression\":0,\"qgroupid\":33,\"resource_poolid\":1,\"snapname\":\"snap1\",\"slice_size\":1073741824,\"grpid\":34,\"backupid\":1,\"vtype\":0,\"next_backupid\":1,\"current_snapshotid\":1,\"appid\":1,\"protection\":0,\"params\":{},\"multinode_mounting\":false,\"genkey\":1603845154537459,\"snapshot_space_limit\":214748364},\"size\":1073741824,\"replication\":1,\"snapname\":\"snap1\",\"layout\":\"round-robin\",\"stordriver\":{\"protection\":\"0\",\"faultdomain\":\"nofd\",\"media\":\"HDD\",\"type\":\"das\"},\"media\":\"HDD\",\"compression\":\"0\",\"k8s_name\":\"centos2-server-01-root-fs-1-5ad0f238\",\"lvm_vol_count\":\"0\",\"lvm_type\":\"None\",\"encryption\":\"none\",\"blocksize\":4096,\"type\":\"root_fs\",\"fstype\":\"xfs\",\"name\":\"centos2.server.01.root_fs.1.5ad0f238-eef0-4b2f-ac5a-9d7712541602\",\"workload\":0,\"path\":\"\\\/\",\"snapshot_space_limit\":214748364,\"disk_tags\":{},\"pvcpolicy\":\"create\",\"volgrp_name\":\"centos2.server.01.72.1.229cc8be-69cb-443b-8232-7300b179d98c\",\"faultdomain\":\"host\",\"protection\":0}],\"role_name\":\"server\",\"service_ports\":[],\"env\":{\"DOCKER_OPTS\":{\"type\":\"text\",\"value\":\"-v \\\/sys\\\/fs\\\/cgroup:\\\/sys\\\/fs\\\/cgroup --cap-add=SYS_ADMIN\"},\"ROOT_PASSWORD\":{\"type\":\"password\",\"value\":\"\"},\"allocated\":{\"ROBINHOST_TAG_ROBINRPOOL\":\"default\",\"ENABLE_SSH\":true,\"ROBINHOST_TAG_KUBERNETES.IO-ARCH\":\"amd64\",\"ROBINHOST\":\"cscale-82-35.robinsystems.com\",\"ROBINHOST_TAG_KUBERNETES.IO-OS\":\"linux\",\"POD_NS\":\"t001-u000003\",\"ROOT_PASSWORD\":\"\",\"DOCKER_OPTS\":\"-v \\\/sys\\\/fs\\\/cgroup:\\\/sys\\\/fs\\\/cgroup --cap-add=SYS_ADMIN\",\"POD_NAME\":\"centos2-server-01\",\"K8S_NODE\":\"cscale-82-35\"},\"ENABLE_SSH\":{\"type\":\"boolean\",\"value\":true}},\"pod_ns\":\"t001-u000003\",\"appid\":17,\"service_uids\":[],\"allocated\":{\"nodename\":\"cscale-82-35\",\"zonename\":\"default\",\"zoneid\":1602807544,\"nodeid\":1},\"allocated_host\":\"cscale-82-35.robinsystems.com\",\"network\":[{\"allocated_names\":[\"eth0\"],\"allocated_netmask\":\"255.255.0.0\",\"ippool\":\"robin-default\",\"allocated_prefix\":16,\"allocated_by\":\"system\",\"driver\":\"calico\",\"interfaces\":1,\"name\":\"robin-default\",\"subnet\":\"172.21.0.0\",\"allocated_ip\":\"172.21.29.89\"}],\"enable_hooklogs\":true,\"vnodeid\":46,\"cpu\":{\"nonisol\":true,\"reserve\":false,\"max\":1,\"min\":0},\"allocated_host_public_ip\":\"10.9.82.35\",\"volume_groups\":[{\"rpoolid\":1,\"layout\":\"round-robin\",\"media\":\"HDD\",\"volumes\":[\"centos2.server.01.data.1.d1392bcc-bc57-4665-9cdd-8b8511d2fed8\"],\"device_sets\":[{\"name\":\"centos2.server.01.72.1.a8fa2791-408f-4d6e-bc44-eaceb9742b0b.0.c7700314-de5a-4f76-8d06-a0fc8e01ea29\",\"stormgr_id\":33,\"devices\":[{\"slices\":77,\"reattachable\":0,\"pused\":100663296,\"score\":98,\"max_latency_sensitive_vols_per_disk\":2,\"aslices\":2,\"psize\":107374182400,\"devpath\":\"\\\/dev\\\/disk\\\/by-id\\\/scsi-360022480843cee146f0d03f0d0bafa89\",\"host\":\"cscale-82-35.robinsystems.com\",\"stormgr_id\":3,\"capacity\":107374182400,\"wwn\":\"0x360022480843cee146f0d03f0d0bafa89\",\"type\":\"HDD\",\"hostname\":\"cscale-82-35.robinsystems.com\",\"max_volumes_per_disk\":10,\"role\":\"Storage\",\"state\":\"READY\",\"tags\":{},\"allocated_slices\":2,\"max_throughput_intensive_vols_per_disk\":1,\"protected\":0,\"write_unit\":4096}]}],\"name\":\"centos2.server.01.72.1.a8fa2791-408f-4d6e-bc44-eaceb9742b0b\",\"replicas\":1,\"stormgr_id\":32},{\"rpoolid\":1,\"layout\":\"round-robin\",\"media\":\"HDD\",\"volumes\":[\"centos2.server.01.block.1.3e22dd9d-59ed-412a-9aa5-18e492e7eb2c\"],\"device_sets\":[{\"name\":\"centos2.server.01.72.1.ecd4456a-798a-4860-980c-0d04686b0fb8.0.61fb0421-5521-4ffc-b27b-1e83aba72aa1\",\"stormgr_id\":34,\"devices\":[{\"slices\":77,\"reattachable\":0,\"pused\":100663296,\"score\":98,\"max_latency_sensitive_vols_per_disk\":2,\"aslices\":2,\"psize\":107374182400,\"devpath\":\"\\\/dev\\\/disk\\\/by-id\\\/scsi-360022480843cee146f0d03f0d0bafa89\",\"host\":\"cscale-82-35.robinsystems.com\",\"stormgr_id\":3,\"capacity\":107374182400,\"wwn\":\"0x360022480843cee146f0d03f0d0bafa89\",\"type\":\"HDD\",\"hostname\":\"cscale-82-35.robinsystems.com\",\"max_volumes_per_disk\":10,\"role\":\"Storage\",\"state\":\"READY\",\"tags\":{},\"allocated_slices\":2,\"max_throughput_intensive_vols_per_disk\":1,\"protected\":0,\"write_unit\":4096}]}],\"name\":\"centos2.server.01.72.1.ecd4456a-798a-4860-980c-0d04686b0fb8\",\"replicas\":1,\"stormgr_id\":33},{\"rpoolid\":1,\"layout\":\"round-robin\",\"media\":\"HDD\",\"volumes\":[\"centos2.server.01.root_fs.1.5ad0f238-eef0-4b2f-ac5a-9d7712541602\"],\"device_sets\":[{\"name\":\"centos2.server.01.72.1.229cc8be-69cb-443b-8232-7300b179d98c.0.a1765d0f-db35-4f27-a8a4-a5d4d6b2f82c\",\"stormgr_id\":35,\"devices\":[{\"slices\":77,\"reattachable\":0,\"pused\":100663296,\"score\":98,\"max_latency_sensitive_vols_per_disk\":2,\"aslices\":2,\"psize\":107374182400,\"devpath\":\"\\\/dev\\\/disk\\\/by-id\\\/scsi-360022480843cee146f0d03f0d0bafa89\",\"host\":\"cscale-82-35.robinsystems.com\",\"stormgr_id\":3,\"capacity\":107374182400,\"wwn\":\"0x360022480843cee146f0d03f0d0bafa89\",\"type\":\"HDD\",\"hostname\":\"cscale-82-35.robinsystems.com\",\"max_volumes_per_disk\":10,\"role\":\"Storage\",\"state\":\"READY\",\"tags\":{},\"allocated_slices\":2,\"max_throughput_intensive_vols_per_disk\":1,\"protected\":0,\"write_unit\":4096}]}],\"name\":\"centos2.server.01.72.1.229cc8be-69cb-443b-8232-7300b179d98c\",\"replicas\":1,\"stormgr_id\":34}],\"bundle_object_id\":\"4f84f8aef3e7a66e7aabbd033ec8872c\",\"bundle_path\":\"\\\/usr\\\/local\\\/robin\\\/collections\\\/file-collection-1602783389182\\\/1603478511563\\\/centos-7\",\"pod_name\":\"centos2-server-01\",\"sidecar_info\":{\"mem\":0,\"hugepages_2m\":0,\"gpu\":0,\"cpu\":0,\"hugepages_1g\":0,\"containers\":[]},\"hosttags\":{\"kubernetes.io\\\/arch\":[\"amd64\"],\"kubernetes.io\\\/os\":[\"linux\"],\"robin.io\\\/robinrpool\":[\"default\"]},\"allocated_host_public_hostname\":\"cscale-82-35.robinsystems.com\",\"ctime\":1603845179,\"restart_num\":15,\"gpu\":{\"count\":0,\"max\":0,\"type\":\"\"},\"restart_on_qoscfg\":true,\"numa_allocations\":{\"0\":{\"isol_shared_cores_used\":0,\"hugepages_2m_used\":0,\"isol_dedicated_cores_used\":0,\"gpu_used\":0,\"non_isol_cores_used\":1,\"mem_used\":209715200,\"hugepages_1g_used\":0}},\"name\":\"centos2.server.01\",\"hostname\":\"centos2-server-01.t001-u000003.svc.cluster.local\",\"vnodehookargs\":{\"postcreate\":[]},\"role\":\"server\",\"disable_vnodehooks\":false,\"mem\":{\"hugepages_1g\":0,\"size\":209715200,\"hugepages_2m\":0}}],\"qgroups\":{\"block\":{\"enabled\":false,\"rd_max_iops\":2000000,\"wr_min_iops\":0,\"priority\":1,\"rd_min_iops\":0,\"rd_weight\":1,\"wr_max_iops\":2000000,\"wr_weight\":1,\"rd_min_window\":500,\"wr_min_window\":500},\"root_fs\":{\"enabled\":false,\"rd_max_iops\":2000000,\"wr_min_iops\":0,\"priority\":1,\"rd_min_iops\":0,\"rd_weight\":1,\"wr_max_iops\":2000000,\"wr_weight\":1,\"rd_min_window\":500,\"wr_min_window\":500},\"data\":{\"enabled\":false,\"rd_max_iops\":2000000,\"wr_min_iops\":0,\"priority\":1,\"rd_min_iops\":0,\"rd_weight\":1,\"wr_max_iops\":2000000,\"wr_weight\":1,\"rd_min_window\":500,\"wr_min_window\":500}},\"scaleout\":\"enabled\",\"multinode_max\":256,\"name\":\"server\",\"skip_headless_service\":false,\"volume_groups\":[],\"restart_on_qoscfg\":true,\"multinode_min\":1,\"elastic_ip_enabled\":false,\"multinode\":true}],\"stordriver\":\"das\",\"parent_last_known_state\":6,\"auto_relocate\":true,\"zoneid\":\"1602807544\",\"version\":\"7\",\"bundle_object_id\":\"4f84f8aef3e7a66e7aabbd033ec8872c\",\"master_name\":\"centos2\",\"rpool\":\"default\",\"restart_num\":15,\"namespace\":\"t001-u000003\",\"name\":\"centos2_snap1\",\"from_template\":null,\"desc\":\"No description was given.\",\"planid\":20,\"parentid\":17,\"app_ns\":\"t001-u000003\",\"pvcpolicy\":\"create\"}",
         "managed":true,
         "create_time":1604523595,
         "username":"robin",
         "user_id":3,
         "repo_name":"repo1",
         "imported":false,
         "backup_id":2,
         "tenant_id":1,
         "user_shares":{

         },
         "tenant":"Administrators",
         "path":"\/1602807544\/centos2_17\/b104bbd41ee011ebb9b5db62eaa9704d\/appconfig\/backup_metadata.json",
         "backupname":"bc1"
      }
   ]
}

12.6. Purge (delete) a backup from a repo

A snapshot that has been backed up to a repo can be purged (deleted from the repo) by issuing the following command:

# robin repo purge <reponame> <backupid>

reponame

Name of the repo to attach

backupid

Id of application backup to purge

Example:

# robin repo purge testrepo 930a489e4f6e11eab782034b0b612bc8 --wait
Are you sure you want to delete backup id: 930a489e4f6e11eab782034b0b612bc8 from repo: testrepo [y/n] ? y
Job:  200 Name: StorageRepoPurge     State: PROCESSED       Error: 0
Job:  200 Name: StorageRepoPurge     State: COMPLETED       Error: 0

Purges (deletes) a backup from a repo.

End Point: /api/v3/robin_server/storage_repo

Method: PUT

URL Parameters: None

Data Parameters:

  • action: purge - This mandatory field within the payload specifies that the purge operation is to be performed.

  • backupid: <backupid> - This mandatory field within the payload specifies that the UUID of the backup to be purged.

  • repo_name: <repo_name> - This mandatory field within the payload specifies the repo from which the backup will be purged.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 404 (Not Found Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":704
}

12.7. Monitor the status of a repo

The status of transfers to and from a repo by issuing the following command:

# robin repo status <reponame>

reponame

Name of the repo to monitor

Example:

# robin repo status datadump
+---------+------------------------------------+-----------------+
| Name    | TransferStatus                     | Schedule/Manual |
+---------+------------------------------------+-----------------+
| backup1 | 20% [####................] 480.0MB | MANUAL          |
+---------+------------------------------------+-----------------+

After a few seconds. We can run the command again to see:

# robin repo status datadump
+---------+-------------------------------------+-----------------+
| Name    | TransferStatus                      | Schedule/Manual |
+---------+-------------------------------------+-----------------+
| backup1 | 100% [####################] 480.0MB | MANUAL          |
+---------+-------------------------------------+-----------------+

Returns the transfer status of backups to a particular repo.

End Point: /api/v3/robin_server/k8s_app/

Method: GET

URL Parameters: None

Data Parameters:

  • action: get_k8s_backup_ops - This mandatory field within the payload specifies that the status of backups should be returned.

  • all: [true|false] - This mandatory field within the payload specifies whether or not the status of all backups (both in progress and completed) within the repo should be returned.

  • repo_name: <repo_name> - This mandatory field within the payload specifies the repo to which the backups are being transferred.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error)

Example Response:

Output
{
   "items":{
      "26596ca6f27a11ea90fe3b3589dcc8cb":{
         "snap_name":"my-appzu_my-s1px",
         "bytes_transferred":503316480,
         "state":"Pushed",
         "bytes_count":503316480,
         "op_trigger":"MANUAL",
         "bytes_skipped":0
      },
      "be94d1d0f25e11eaa72edd449692af76":{
         "snap_name":"my-appyx_my-s1tr",
         "bytes_transferred":369098752,
         "state":"Pushed",
         "bytes_count":369098752,
         "op_trigger":"MANUAL",
         "bytes_skipped":0
      }
   }
}

12.8. Share a repo with tenants

In order to share a storage repo with one or more tenants, issue the following command:

# robin repo tenant-share <repo_name> [tenant_list]
                                      --operations <operations>
                                      --all-tenants

repo_name

Name of the repo to share

tenant_list

Optional comma separeted list of tenants to share the repo with

--operations <operations>

Comma separated list of operations that can be performed on a storage repo shared with tenants. To allow all valid operations to be performed, enter ‘ALL_OPERATIONS’ on the command line (default value is ‘view’)

--all-tenants

Share a repo (for specified operations) with all tenants

Note

At least one of the following options, tenant_list or --all-tenants, must be used in order to specify the tenants to share the repo with.

Example:

# robin repo tenant-share testrepo t1 --wait
Job:  207 Name: StorageRepoShare     State: PROCESSED       Error: 0
Job:  207 Name: StorageRepoShare     State: COMPLETED       Error: 0

Note

The ability to share a repo with tenants is subject to Role Based Access Control (RBAC). Only Cluster Administrators (users having the superadmin role) have permission to do so. See the section on User Management for details on how RBAC works.

Shares a repo with a set of tenants whilst also assigning the operations the aforementioned tenants are allowed to perform on the repo.

End Point: /api/v3/robin_server/storage_repo/<repo_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: tenant_share - This mandatory field within the payload specifies that the tenant share operation is to be performed.

  • tenant_list: <list_of_user_names> - Utilizing this parameter within the payload, by specifiying a comma seperated list of tenant names, results in the repo being shared with the respective tenants.

  • operation_list: <list_of_operations> - Utilizing this parameter within the payload, by specifying a comma seperated list of operations, results in the aforementioned tenants being able to perform the given operations on the target repo. If not specified, the ‘view’ operation is assigned by default. To allow all valid operations to be performed specify a list containing ‘ALL_OPERATIONS’.

  • all_tenants: true - Utilizing this parameter within the payload results in the repo being shared with all tenants in the cluster. The default value is false. Note this field overrides any tenants passed via the tenant_list parameter.

Note

At least one of the following options, tenant_list or all_tenants, must be used in order to specify the tenants to share the repo with. In addition to view a list of operations that can be shared for the repo object, review the section detailed here.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":782
}

12.9. Stop sharing a repo with tenants

In order to stop sharing a storage repo with one or more tenants, issue the following command:

# robin repo tenant-unshare <reponame> [tenant_list]
                                       --operations <operations>
                                       --all-tenants

reponame

Name of the repo to stop sharing

tenant_list

List of tenants to stop sharing the repo with

--operations <operations>

Comma separated list of operations to stop allowing on a repo shared with specified tenants.

--all-tenants

Stop sharing a repo (for specified operations) with all tenants

Note

At least one of the following options, tenant_list or --all-tenants, must be used in order to specify the tenants to unshare the repo with.

Example:

# robin repo tenant-unshare testrepo t1 --wait
Job:  208 Name: StorageRepoUnshare   State: PROCESSED       Error: 0
Job:  208 Name: StorageRepoUnshare   State: COMPLETED       Error: 0

Note

The ability to stop sharing a storage repo with tenants is subject to Role Based Access Control (RBAC). Only Cluster Administrators (users having the superadmin role) have permission to do so. See the section on User Management for details on how RBAC works.

Unshares a repo with a set of tenants and/or unassigns operations the aforementioned tenants are allowed to perform on the repo.

End Point: /api/v3/robin_server/storage_repo/<repo_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: tenant_unshare - This mandatory field within the payload specifies that the tenant unshare operation is to be performed.

  • tenant_list: <list_of_user_names> - Utilizing this parameter within the payload, by specifiying a comma seperated list of tenant names, results in the repo being unshared with the respective tenants.

  • operation_list: <list_of_operations> - Utilizing this parameter within the payload, by specifying a comma seperated list of operations, results in the aforementioned tenants not being able to perform the given operations on the target repo. To disallow all valid operations to be performed specify a list containing ‘ALL_OPERATIONS’.

  • all_tenants: true - Utilizing this parameter within the payload results in the repo being unshared with all tenants in the cluster. The default value is false. Note this field overrides any tenants passed via the tenant_list parameter.

Note

At least one of the following options, tenant_list or all_tenants, must be used in order to specify the tenants to unshare the repo with. In addition to view a list of operations that can be unshared for the repo object, review the section detailed here.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":875
}

12.10. Share a repo with users

In order to share a storage repo with one or more users, issue the following command:

# robin repo user-share <reponame> <tenant> [user_list]
                                            --operations <operations>
                                            --all-tenant-users

reponame

Name of the storage repo to share

tenant

Tenant to which the user share should be added to

user_list

List of users to share the repo with

--operations <operations>

List of operations the user will be allowed to perform. To allow all valid operations to be performed, specify ‘ALL_OPERATIONS’ on the command line (default value is ‘view’)

--all-tenant-users

Share a repo (for specified operations) with all users

Note

At least one of the following options, user_list or --all-tenant-users, must be used in order to specify the users to share the repo with.

Example:

# robin repo user-share testrepo --tenant t1 --all-tenant-users --wait
Job:  201 Name: StorageRepoShare     State: PROCESSED       Error: 0
Job:  201 Name: StorageRepoShare     State: COMPLETED       Error: 0

# robin repo user-share testrepo admin1 --tenant t1 --operations ALL_OPERATIONS --wait
Job:  203 Name: StorageRepoShare     State: PROCESSED       Error: 0
Job:  203 Name: StorageRepoShare     State: COMPLETED       Error: 0

# robin repo list-shares
Tenant Shares:

Repo Id | Repo Name | Operation | Tenants
--------+-----------+-----------+-------------
1       | testrepo  | view      | All Tenants

User Shares:
Repo Id | Repo Name | Operation | Tenant | Users
--------+-----------+-----------+--------+--------------------
1       | testrepo  | view      | t1     | All Tenant Users
1       | testrepo  | push      | t1     | admin2,user1,user2

Note

The ability to share a storage repo with users is subject to Role Based Access Control (RBAC). Only Cluster Administrators (users having the superadmin role) and Tenant Administrators (users having the tenantadmin role) have permission to do so. Tenant Administrators are only allowed to share a storage repo with users from their tenant. See the section on User Management for details on how RBAC works.

Shares a repo with a set of users within a tenant whilst also assigning the operations the aforementioned users are allowed to perform on the repo.

End Point: /api/v3/robin_server/storage_repo/<repo_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: user_share - This mandatory field within the payload specifies that the user share operation is to be performed.

  • tenant: <tenant_name> - This mandatory field within the payload specifies the name of the tenant the user share should be added to.

  • user_list: <list_of_user_names> - Utilizing this parameter within the payload, by specifiying a comma seperated list of usernames, results in the repo being shared with the respective users.

  • operation_list: <list_of_operations> - Utilizing this parameter within the payload, by specifying a comma seperated list of operations, results in the aforementioned users being able to perform the given operations on the target repo. If not specified, the ‘view’ operation is assigned by default. To allow all valid operations to be performed specify a list containing ‘ALL_OPERATIONS’.

  • all_tenant_users: true - Utilizing this parameter within the payload results in the repo being shared with all users of the specified tenant. The default value is false. Note this field overrides any users passed via the user_list parameter.

Note

At least one of the following options, user_list or all_tenant_users, must be used in order to specify the users to share the repo with. In addition to view a list of operations that can be shared for the repo object, review the section detailed here.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":732
}

12.11. Stop sharing a repo with users

In order stop sharing a storage repo with one or more users, issue the following command:

# robin repo user-unshare <reponame> <tenant> [user_list]
                                              --operations <operations>
                                              --all-tenant-users

reponame

Name of the repo to stop sharing

tenant

Tenant user share should be removed from

user_list

List of users to stop sharing the repo with

--operations <operations>

Comma separated list of operations to stop allowing on a repo shared with specified users.

--all-tenant-users

Stop sharing a repo (for specified operations) with all users

Note

At least one of the following options, user_list or --all-tenant-users, must be used in order to specify the users to unshare the repo with.

Example:

# robin repo user-unshare testrepo t1 admin1 --operations share --wait
Job:  205 Name: StorageRepoUnshare   State: PROCESSED       Error: 0
Job:  205 Name: StorageRepoUnshare   State: COMPLETED       Error: 0

Note

The ability to stop sharing a storage repo with users is subject to Role Based Access Control (RBAC). Only Cluster Administrators (users having the superadmin role) and Tenant Administrators (users having the tenantadmin role) have permission to do so. Tenant Administrators are only allowed to stop sharring a storage repo with users from their tenant. See the section on User Management for details on how RBAC works.

Unshares a repo with a set of users and/or unassigns operations the aforementioned users are allowed to perform on the repo.

End Point: /api/v3/robin_server/storage_repo/<repo_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: user_unshare - This mandatory field within the payload specifies that the user unshare operation is to be performed.

  • tenant: <tenant_name> - This mandatory field within the payload specifies the name of the tenant the user share should be removed from

  • user_list: <list_of_user_names> - Utilizing this parameter within the payload, by specifiying a comma seperated list of usernames, results in the repo being unshared with the respective users.

  • operation_list: <list_of_operations> - Utilizing this parameter within the payload, by specifying a comma seperated list of operations, results in the aforementioned users not being able to perform the given operations on the target repo. To disallow all valid operations to be performed specify a list containing ‘ALL_OPERATIONS’.

  • all_tenant_users: true - Utilizing this parameter within the payload results in the repo being unshared with all users of the specified tenant. The default value is false. Note this field overrides any users passed via the user_list parameter.

Note

At least one of the following options, user_list or all_tenant_users, must be used in order to specify the users to unshare the repo with. In addition to view a list of operations that can be unshared for the repo object, review the section detailed here.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":776
}

12.12. List shares of a repo with tenants and users

List tenant and users shares of a storage repo:

# robin repo list-shares [username]

username

The username of the user to show storage repo shares for. If username is not supplied, then show storage repos shares for all users.

Example:

# robin repo list-shares
Tenant Shares:

Repo Id | Repo Name | Operation | Tenants
--------+-----------+-----------+-------------
1       | testrepo  | view      | All Tenants

User Shares:

Repo Id | Repo Name | Operation | Tenant | Users
--------+-----------+-----------+--------+------------------
1       | testrepo  | view      | t1     | All Tenant Users
1       | testrepo  | view      | t2     | All Tenant Users
1       | testrepo  | view      | t3     | All Tenant Users
1       | testrepo  | push      | t1     | user2,user1
1       | testrepo  | push      | t2     | user3,user4

Note

The ability to list storage repo shares is subject to Role Based Access Control (RBAC). Only Cluster Administrators (users having the superadmin role) and Tenant Administrators (users having the tenantadmin role) have permission to do so. Tenant Administrators are only allowed to view repo shares for users from their tenant. See the section on User Management for details on how RBAC works.

Lists the users/tenants each repo is shared with alongside the operations the aforementioned users/tenants can perform on each of the respective repos.

End Point: /api/v3/robin_server/storage_repo

Method: GET

URL Parameters: None

Data Parameters:

  • sub_command: get_shares - This mandatory field within the payload specifies that repo user/tenant shares should be returned.

  • username: <user_name> - Utilizing this parameter within the payload, by specifiying the name of a user, results in only repo shares for the respective user being returned.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "repo_shares":{
      "user_shares":[
         {
            "all_tenant_users":false,
            "operation":"view",
            "storage_repo":{
               "name":"demo-backup",
               "repo_id":1
            },
            "users":[
               "user2"
            ],
            "id":2,
            "share_type":"storage_repo_share",
            "object_type":"STORAGE_REPO",
            "tenant":"Administrators"
         }
      ],
      "tenant_shares":[
         {
            "all_tenants":true,
            "operation":"view",
            "storage_repo":{
               "name":"demo-backup",
               "repo_id":1
            },
            "id":2,
            "share_type":"storage_repo_tenant_share",
            "tenants":[

            ],
            "object_type":"STORAGE_REPO"
         }
      ]
   }
}