ibm.storage_virtualize.ibm_sv_manage_snapshot (2.3.1) — module

This module manages snapshots (PiT image of a volume) on IBM Storage Virtualize family systems

| "added in version" 1.9.0 of ibm.storage_virtualize"

Authors: Sanjaikumaar M (@sanjaikumaar), Sumit Kumar Gupta (@sumitguptaibm)

Install collection

Install with ansible-galaxy collection install ibm.storage_virtualize:==2.3.1


Add to requirements.yml

  collections:
    - name: ibm.storage_virtualize
      version: 2.3.1

Description

In this implementation, a snapshot is a mutually consistent image of the volumes in a volume group or a list of independent volume(s).

This Ansible module provides the interface to manage snapshots through 'addsnapshot', 'chsnapshot' and 'rmsnapshot' Storage Virtualize commands.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create volumegroup snapshot
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: ansible_1
   src_volumegroup_name: volumegroup1
   snapshot_pool: Pool0Childpool0
   state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create volumes snapshot
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: ansible_2
   src_volume_names: vdisk0:vdisk1
   snapshot_pool: Pool0Childpool0
   state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create safeguarded snapshot
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: ansible_2
   src_volume_names: vdisk0:vdisk1
   safeguarded: true
   retentiondays: 1
   snapshot_pool: Pool0Childpool0
   state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update snapshot ansible_2
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: ansible_new
   old_name: ansible_2
   ownershipgroup: ownershipgroup0
   state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Restore all volumes of a volumegroup from a snapshot
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: snapshot0
   src_volumegroup_name: volumegroup1
   snapshot_pool: Pool0Childpool0
   state: restore
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Restore subset of volumes of a volumegroup from snapshot
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: snapshot0
   src_volumegroup_name: volumegroup1
   src_volume_names: vdisk0:vdisk1
   snapshot_pool: Pool0Childpool0
   state: restore
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create transient snapshot
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: snapshot0
   src_volume_names: vdisk0:vdisk1
   safeguarded: true
   retentionminutes: 5
   snapshot_pool: Pool0Childpool0
   state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete volumegroup snapshot
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: ansible_1
   src_volumegroup_name: volumegroup1
   state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete volume snapshot
  ibm.storage_virtualize.ibm_sv_manage_snapshot:
   clustername: '{{clustername}}'
   username: '{{username}}'
   password: '{{password}}'
   name: ansible_new
   state: absent

Inputs

    
name:
    description:
    - Specifies the name of a snapshot.
    type: str

state:
    choices:
    - present
    - restore
    - absent
    description:
    - Creates, updates (C(present)), restores from (C(restore)) or deletes (C(absent))
      a snapshot.
    required: true
    type: str

token:
    description:
    - The authentication token to verify a user on the Storage Virtualize system.
    - To generate a token, use the M(ibm.storage_virtualize.ibm_svc_auth) module.
    type: str

domain:
    description:
    - Domain for the Storage Virtualize system.
    - Valid when hostname is used for the parameter I(clustername).
    type: str

log_path:
    description:
    - Path of debug log file.
    type: str

old_name:
    description:
    - Specifies the old name of a snapshot.
    - Valid when I(state=present), to rename the existing snapshot.
    type: str

password:
    description:
    - REST API password for the Storage Virtualize system.
    - The parameters I(username) and I(password) are required if not using I(token) to
      authenticate a user.
    type: str

username:
    description:
    - REST API username for the Storage Virtualize system.
    - The parameters I(username) and I(password) are required if not using I(token) to
      authenticate a user.
    type: str

clustername:
    description:
    - The hostname or management IP of the Storage Virtualize system.
    required: true
    type: str

safeguarded:
    description:
    - Flag to create a safeguarded snapshot.
    - I(safeguarded) and I(retentiondays) are required together.
    - Supported in SV build 8.5.2.0 or later.
    type: bool
    version_added: 1.10.0
    version_added_collection: ibm.storage_virtualize

ignorelegacy:
    default: false
    description:
    - Specifies the addition of the volume snapshots although there are already legacy
      FlashCopy mappings using the volume as a source.
    type: bool

retentiondays:
    description:
    - Specifies the retention period in days.
    - I(safeguarded) and I(retentiondays) are required together.
    - Applies, when I(state=present) to create a safeguarded snapshot.
    type: int
    version_added: 1.10.0
    version_added_collection: ibm.storage_virtualize

snapshot_pool:
    description:
    - Specifies the name of child pool within which the snapshot is being created.
    type: str

ownershipgroup:
    description:
    - Specifies the name of the ownershipgroup.
    - Valid when I(state=present), to update an existing snapshot.
    type: str

validate_certs:
    default: false
    description:
    - Validates certification.
    type: bool

retentionminutes:
    description:
    - Specifies the retention period in minutes in range 1 - 1440.
    - I(retentionminutes) and I(retentiondays) are mutually exclusive.
    - Applies, when I(state=present) to create a transient snapshot.
    type: int
    version_added: 2.2.0
    version_added_collection: ibm.storage_virtualize

src_volume_names:
    description:
    - Specifies the name of the volumes for which the snapshots are to be created.
    - List of volume names can be specified with the delimiter colon.
    - Valid when I(state=present), to create a snapshot.
    type: str

src_volumegroup_name:
    description:
    - Specifies the name of the source volume group for which the snapshot is being created.
    - I(src_volumegroup_name) and I(src_volume_names) are mutually exclusive for creating
      snapshot.
    - Required one of I(src_volumegroup_name) or I(src_volume_names) for creation of snapshot.
    type: str