Configuring the snapshot offload API

Configure the offload API to enable snapshot offloading to IBM® Storage Protect storage.

Before you begin

Before you configure the offload API, ensure that you have the following prerequisites:

  • IBM Storage Protect server:
    • IBM Storage Protect server version 7.1.x or later is installed and configured.
    • IBM Storage Protect server is accessible from offload and restore agents.
    • Node registration is completed.

    For more information, see IBM Storage Protect server documentation.

  • IBM Storage Protect backup-archive client:
    • Backup-archive client is installed on offload and restore agents.
    • Client version is compatible with IBM Storage Protectserver.
    • Client is registered with IBM Storage Protect server.

    For more information, see IBM Storage Protect backup-archive clients documentation.

  • Offload agent:
    • Additional VM provisioned for orchestrating snapshot offloading
    • SSH enabled between the Copy Data Management appliance and the offload agent VM
    • Operating system: RHEL 8.x or RHEL 9.x
  • Restore agent:
    • VM configured to restore offloaded backups from Spectrum Protect Server
    • SSH enabled between the Copy Data Management appliance and the restore agent VM
    • Operating system: RHEL 8.x or RHEL 9.x
  • Storage system:
    • IBM Storage Virtualize for Snapshot is registered in the Copy Data Management appliance.

About this task

The offload feature enables you to offload snapshots to IBM Storage Protect storage for long-term retention. You configure the offload API by editing the YAML configuration file and restarting the offload service.

Procedure

  1. From the Copy Data Management appliance, open the offload configuration file:
    /opt/scdm/config/offload.yaml
  2. Configure the offload agent parameters in the offload.offloadAgent section:
    Parameter Required Type Description
    id Yes String Host ID in storage system for LUN mapping. To obtain the ID, from the Copy Data Management UI, select Infrastructure > Hosts > Inspect > Network > Preview, then copy the ID value. Example: "1001"
    host Yes String IP address of the offload agent.
    user Yes String SSH username with sudo privileges. Example: "root"
    keyPassphrase No String Passphrase for encrypted SSH key.
    privateKey Yes Multi-line string SSH private key. To obtain the key, issue cat ~/.ssh/offload_key. Format the key as a multi-line string. Example:
    --BEGIN RSA PRIVATE KEY--
    KEY_CONTENT
    --END RSA PRIVATE KEY--
    offload:
      offloadAgent:
        id: "1001"
        host: "192.168.1.100"
        user: "root"
        keyPassphrase: ""
        privateKey: |
          -----BEGIN RSA PRIVATE KEY-----
          KEY_CONTENT
          -----END RSA PRIVATE KEY-----
  3. Configure the restore agent parameters in the offload.restoreAgent section:
    Parameter Required Type Description
    host Yes String IP address of the restore agent.
    user Yes String SSH username. Example: "root"
    keyPassphrase No String Passphrase for encrypted SSH key.
    privateKey Yes Multi-line string SSH private key formatted as a multi-line string.
      restoreAgent:
        host: "192.168.1.101"
        user: "root"
        keyPassphrase: ""
        privateKey: |
          -----BEGIN OPENSSH PRIVATE KEY-----
          KEY_CONTENT
          -----END OPENSSH PRIVATE KEY-----
  4. Configure the file list parameters in the offload.fileList section:
    Parameter Required Type Description
    tempDir Yes String Directory for temporary file lists. Default: /tmp
    remoteTimeoutMs Yes Integer Timeout for file list generation in milliseconds. Default: 300000
    useXdev Yes Boolean Restrict to single filesystem. Default: false
      fileList:
        tempDir: "/tmp"
        remoteTimeoutMs: 300000
        useXdev: false
  5. Configure the IBM Storage Virtualize for Snapshot parameters in the offload.svc section:
    Parameter Required Type Description
    tlsInsecure Yes Boolean Disable TLS certificate verification. The value of this parameter must be set to true.
    port Yes Integer HTTPS port for storage REST API. Default: 7443
    defaultPool Yes String Storage pool name for clones. To obtain the pool name, from the IBM® Storage FlashSystem UI, select Pools > Name. Example: "pool01"
      svc:
        tlsInsecure: true
        port: 7443
        defaultPool: "pool01"
  6. Configure the unmount parameters in the offload.unmount section:
    Parameter Required Type Description
    baseMountDir Yes String Directory where snapshots are temporarily mounted on the offload agent for offload operations. This directory is used temporarily for mounting snapshots on the offload agent. The value of this parameter must be set to /mnt/offload.
    umountTimeoutMs Yes Integer Timeout for individual unmount operations in milliseconds. Default: 20000
    baseUmountTimeoutMs Yes Integer Timeout for base directory unmount in milliseconds. Default: 30000
    allowLazyUmount Yes Boolean Allow lazy unmount as fallback. Default: true
      unmount:
        baseMountDir: "/mnt/offload"
        umountTimeoutMs: 20000
        baseUmountTimeoutMs: 30000
        allowLazyUmount: true
  7. Configure the DSMC parameters in the offload.dsmc section:
    Parameter Required Type Description
    path Yes String Path to the dsmc executable. To obtain the path, issue which dsmc. Example: "dsmc"
    servername Yes String IBM Storage Protect server stanza name. To obtain the server name, issue cat dsm.sys. Example: "spinst01"
    optfile Yes String Path to the DSMC options file. Default: /opt/tivoli/tsm/client/ba/bin/dsm.opt. To locate the file, issue find / -name dsm.opt
    timeoutSeconds Yes Integer Timeout for backup and restore operations in seconds. Default: 43200
      dsmc:
        path: "dsmc"
        servername: "spinst01"
        optfile: "/opt/tivoli/tsm/client/ba/bin/dsm.opt"
        timeoutSeconds: 43200
  8. Save the configuration file.
  9. Restart the offload service to apply the configuration changes:
    kubectl rollout restart deployment/scdm-offload-service

Results

The offload API is configured and ready to use. You can now invoke the offload API to offload snapshots to IBM Storage Protect storage.

What to do next

For information about the offload API, see IBM Storage Defender Copy Data Management RESTful API.

To troubleshoot issues with the offload API, view the logs by running the following command:

kubectl logs -n scdm -f <podname>