Adding a site

You can add a new site.

Method and URI

To add a site, use a POST method with a URI:

POST    https://{hostname|IPv4}/api/site

Parameters

None.

Data

Data 1: name

The name of the site.

  • Example value: Dallas

  • Type: String. Required. Available in the web user interface.

Data 2: description

The description of the site.

  • Example value: BlueMachines Dallas data center

  • Type: String.

Data 3: defaultSite

Indication of whether the site is set as the default.

Requirement: You must have at least one default site, which is usually Primary. If you set another site as a default site, the current one is unset.

  • Example value: false

  • Type: Boolean.

Data 4: throttles

The throttle settings.

Restriction: Throttle settings apply to outgoing traffic from vSnap servers in replication, archive, and copy operations, but not to restore operations.

Tip

If you associate a vSnap server with a site, the vSnap server uses the throttle settings of the site with the time zone setting of the vSnap server.

  • Example value:

[
    {
        "rate":      "786432000",
        "schedules": [
            {
                "start": 115200,
                "end":   147599
            },
            {
                "start": 201600,
                "end":   233999
            }
        ]
    }
]
  • Type: List. Available in the web user interface.

Data 4.1: throttles > JSON object > rate

The throughput in bytes per second.

  • Type: Integer. Available in the web user interface.

Data 4.2 throttles > JSON object > schedules

Schedule settings. The sample values, which start at 0 and end at 3600, specify a range beween midnight and 1 AM on Sunday. By default, both values are set to 0. As a result, throttling is disabled.

  • Type: Array. Available in the web user interface.

Data 4.2.1 throttles > JSON object > schedules > JSON object > start

The start time defined by the number of seconds after Sunday 00:00:00.

Type: Integer. Available in the web user interface.

Data 4.2.2 throttles > JSON object > schedules > JSON object > start

The end time defined by the number of seconds after Sunday 00:00:00.

Type: Integer. Available in the web user interface.

Data 5: loadBalanceRatio

VMware VM allocation.

Restriction: Do not enter a value other than 100 unless you are instructed to do so by IBM Software Support.

  • Value: 100

  • Type: Integer. Available in the web user interface.

Example: Add a new site with throttle settings

As you can see in the IBM Spectrum Protect Plus interface in your web browser, every site allows you to specify throttles to restrict the bandwidth that IBM Spectrum Protect Plus uses.

For example, assume that you have an SLA policy that takes a backup snapshot every hour. You do not want to consume too much bandwidth with this job during business hours, which are from 8 AM through 5 PM Monday through Friday and 8 AM through 3 PM on Saturdays. Your office is located in the US Central Daylight Time (CDT) zone.

Log in to one of the vSnap servers that are associated with the site, and see the time zone setting of the vSnap server:

[sarah@workstation ~ ] ssh sarah-vsnap1@10.0.1.1    # vsnap-dallas1
sarah-vsnap1@10.0.1.1's password: 6bxPYs6eQNa!V85R
Last login: Mon Jun 01 00:00:00 2020 from 10.0.0.1
----------------------------------------------------------------
Be sure to adhere to vSnap hardware and memory requirements
 as described in IBM Spectrum Protect Plus Blueprints
 accessible from the IBM Spectrum Protect Plus Knowledge Center.

----------------------------------------------------------------
[sarah-vsnap1@vsnap-dallas1 ~]$ timedatectl
      Local time: Mon 2020-06-01 01:00:00 UTC
  Universal time: Mon 2020-06-01 01:00:00 UTC
        RTC time: Mon 2020-06-01 01:00:00
       Time zone: UTC (UTC, +0000)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: yes
      DST active: n/a
...

This output indicates that the time zone of this vSnap server is set to UTC, which is 5 hours ahead of CDT.

You want to limit the bandwidth to a maximum of 750 MB per second during these business hours and allow unlimited bandwidth after hours.

The rate is 750 MB per second, which is 786,432,000 bytes per second. Monday at 8 AM CDT or 1 PM UTC is 133,200 seconds after 0:00 AM on Sunday. This value can be calculated by using the following formula: 60 × 60 × 24 + 60 × 60 × 13. The other time ranges can be calculated in a similar way.

_data = f'''{{
    "name":        "Dallas",
    "description": "BlueMachines Dallas Data Center",
    "defaultSite": false,
    "throttles":   [
        {{
            "rate": "786432000",
            "schedules": [
                {{"start": 133200, "end":165599}},
                {{"start": 219600, "end":251999}},
                {{"start": 306000, "end":338399}},
                {{"start": 392400, "end":424799}},
                {{"start": 478800, "end":511199}},
                {{"start": 565200, "end":590399}}
            ]
        }}
    ],
    "loadBalanceRatio": 100
}}'''

requests.post('https://' + spp_ipv4 + '/api/site',
    headers={...}, data=_data, verify=...)
_images/reference_site_create2.png

Figure 50 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click System Configuration > Site and click Add Site. Optionally, you can specify properties by selecting the Enable Throttle checkbox. As mentioned, the vSnap servers that are associated with this site use their time zones.

The request prompts a response with the HTTP status of 201 (Created). The response body is similar to the JSON object for the Dallas site, as shown in Getting site information. Review the response to ensure that the new site, Dallas, was created.