Initializing a vSnap server

Initialize a new vSnap server you have added in three methods: (1) using the REST API, (2) using the browser interface, and (3) using the shell session on the vSnap server. This section describes the first method. For the second and the third methods, see the IBM Spectrum Protect Plus Installation and User’s Guide. You can enable or disable encryption when you initialize the vSnap server.

Method and URI

To initialize the vSnap server with or without encryption, use a POST method and a URI:

POST    https://{hostname|IP}/api/storage/{storageId}/management

Tip

To get a {storageId} value based on its name, follow the instructions in Getting a {storageId}.

Parameters

Parameter 1: action

Start an action to initialize the vSnap server with encryption.

  • Value: Use an either one of the following values:

Value

Description

initwithencryption

Initialize the vSnap server with encryption

init

Initialize the vSnap server without encryption

  • Type: System string. Required. Available in the web user interface.

Data

Data 1: async

  • Value: true

  • Type: Boolean. Required.

Example: Initialize a vSnap server with encryption

Assume that you added a vSnap server, vsnap-dallas1 ({storage_id} 2001) to IBM Spectrum Protect Plus. A Python snippet that is similar to the following example can be used to initialize the vSnap server with encryption:

storage_id = "2101"

_params = {"action": "initwithencryption"}

_data = f'''{{
    "async": true
}}'''

requests.post('https://' + spp_ipv4 + '/api/storage/' + storage_id
    + '/management',
    headers={...}, params=_params, data=_data, verify=...)
_images/reference_vsnap_initialize01.png

Figure 34 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click System Configuration > Backup Storage > Disk and click Actions > Initialize or Initialize with Encryption.

The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).

{
    "links": {...},
    "resourceType": "server",
    "fqdn": "vsnap-centos.dallas.bluemachines.com.invalid",
    "hostname": "vsnap-dallas1",
    "id": "2101",
    "init_status": "Initializing",
    "nfs_version": "1.3.0-0.61.el7",
    "nginx_version": "1.12.2-3.el7",
    "os_name": "CentOS Linux",
    "os_version": "7.6.1810",
    "samba_version": "4.8.3-4.el7",
    "uwsgi_version": "2.0.17.1-2.el7",
    "vsnap_version": "10.1.6-1530",
    "zfs_version": "0.8.1-20191020.el7",
    "providerNodeId": "2101"
}