APIs in Category: snapshot | API version 1.4

snapshot-create snapshot-delete snapshot-delta-info snapshot-get-reserve snapshot-get-schedule snapshot-list-info snapshot-reclaimable-info snapshot-rename snapshot-reserve-list-info snapshot-restore-file snapshot-restore-volume snapshot-set-reserve snapshot-set-schedule snapshot-volume-info

NetApp Manage ONTAP

snapshot-create | [top]

> Create a new snapshot on a specified volume.

> Input Name | Range | Type | Description
> async |  | boolean optional | whether the snapshot is to be created asynchronously
> snapshot |  | string | Name of the snapshot to be created.
> volume |  | string | Name of the volume on which the snapshot is to be created.

> Errno | Description
> ESNAPSHOTEXISTS |  |
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEMOUNTING |  |
> EVOLUMEOFFLINE |  |
> ENOMORESNAPS |  |
> ENOSPCSNAP |  |
> ENOMEM |  |
> ETIMEDOUT |  |

snapshot-delete | [top]

> Delete a snapshot on a specified volume. EBUSY is returned when the snapshot is in use. EROFS is returned when the volume is read-only. EAGAIN is returned when splitting a blockmap or reverting.

> Input Name | Range | Type | Description
> snapshot |  | string | Name of snapshot to be deleted on the specified volume.
> volume |  | string | Name of the volume on which the snapshot is to be deleted.

> Errno | Description
> ESNAPSHOTDOESNOTEXIST |  |
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEMOUNTING |  |
> EVOLUMEOFFLINE |  |
> EAPIERROR |  |
> ESNAPSHOTNOTALLOWED |  |
> EBUSY |  |
> EROFS |  |
> EAGAIN |  |

snapshot-delta-info | [top]

> Returns the amount of space consumed between two snapshots or a snapshot and active filesystem.

> Input Name | Range | Type | Description
> snapshot1 |  | string | Name of snapshot to be compared with snapshot2 for space consumption calculations.
> snapshot2 |  | string optional | Name of snapshot to be compared with snapshot1 for space consumption calculations. If the snapshot is not specified, it is assumed to be Active File System.
> volume |  | string | Name of the volume on which the snapshot delta is to calculated.
> Output Name | Range | Type | Description
> consumed-size |  | integer | Size in bytes of space changed between the 2 specified snapshots or snapshot and the active file system. Range : [0 - 2^63-1].
> elapsed-time |  | integer | Time in seconds elapsed between the 2 specified snapshots or the snapshot and the active file system. Range : [0 - 2^31-1].

> Errno | Description
> ESNAPSHOTDOESNOTEXIST |  |
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEMOUNTING |  |
> EVOLUMEOFFLINE |  |
> EVOLUMEBUSY |  |

snapshot-get-reserve | [top]

> Obtain the current snapshot reserve on a specified volume. Error Returns: Invalid volume name.

> Input Name | Range | Type | Description
> volume |  | string | Name of the volume that contains the snapshot reserve.
> Output Name | Range | Type | Description
> blocks-reserved |  | integer | The number of 1024 byte blocks that has been set aside as reserve for snapshot usage.
> percent-reserved |  | integer | The percentage of disk space that has been set aside as reserve for snapshot usage.

> Errno | Description
> ESNAPSHOTDOESNOTEXIST |  |
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEMOUNTING |  |
> EVOLUMEOFFLINE |  |

snapshot-get-schedule | [top]

> Obtain the current snapshot schedule on a specified volume. Error Returns: Invalid volume name.

> Input Name | Range | Type | Description
> volume |  | string | This the volume name where the snapshots are located.
> Output Name | Range | Type | Description
> days |  | integer | The number of snapshots taken daily to keep on line.
> hours |  | integer | The number of snapshots taken hourly to keep on line.
> minutes |  | integer | The number of snapshots taken minutely to keep on line.
> weeks |  | integer | The number of snapshots taken weekly to keep on line.
> which-hours |  | string | A list of the hours at which the hourly snapshots are created.
> which-minutes |  | string | A list of the minutes at which the minutely snapshots are created.

> Errno | Description
> ESNAPSHOTDOESNOTEXIST |  |
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEMOUNTING |  |
> EVOLUMEOFFLINE |  |

snapshot-list-info | [top]

> Return snapshot information for a specified volume. A list of snapshots and information about each snapshot is returned.

> Input Name | Range | Type | Description
> terse |  | boolean optional | If set to true, the snapshot block ownership values, namely the "total" and "cumulative-total" outputs, will be omitted. Use of this option can be helpful if there is an ongoing single file snap restore, as the block ownership calculation may take a substantial amount of time during the restore. If not set or set to false, block ownership will be calculated and included in the output. It is strongly suggested that this option be set to true unless there is an actual need for the block ownership outputs.
> volume |  | string | Name of the volume on which to list the snaplist information.
> Output Name | Range | Type | Description
> snapshots |  | snapshot-info[] |

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEMOUNTING |  |
> EVOLUMEOFFLINE |  |

snapshot-reclaimable-info | [top]

> Returns the amount of space that would be freed when a set of snapshots are deleted from a specified volume.

> Input Name | Range | Type | Description
> snapshots |  | snapshot-name[] | List of snapshots. A maximum of 255 snapshots can be listed.
> volume |  | string | Name of the volume on which the snapshot reclaimable space info is to be collected.
> Output Name | Range | Type | Description
> reclaimable-size |  | integer | Size in bytes of space reclaimable if the snapshots were deleted. Range : [0 - 2^63-1].

> Errno | Description
> ESNAPSHOTDOESNOTEXIST |  |
> ESNAPSHOTTOOMANY |  |
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEMOUNTING |  |
> EVOLUMEOFFLINE |  |
> EVOLUMEBUSY |  |

snapshot-rename | [top]

> Rename a specified snapshot to a new name on a specified volume.

> Input Name | Range | Type | Description
> current-name |  | string | Name of snapshot to be renamed.
> new-name |  | string | New name of snapshot as a result of the rename.
> volume |  | string | Name of the volume where the current snapshot and the new snapshot are located.

snapshot-reserve-list-info | [top]

> Gets the percentage of disk space that is reserved for snapshots in the indicated volume. If no volume is specified, this will return the percentage of disk space reserved for snapshots for each of the volumes in the system. Reserve space can be used only by snapshots and not by the active file system.

> Input Name | Range | Type | Description
> volume |  | string optional | Volume to get percentage of space reserved for snapshots.
> Output Name | Range | Type | Description
> snapshot-reserve-details |  | snapshot-reserve-detail-info[] | List of volumes along with their snapshot space reservation configuration.

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |

snapshot-restore-file | [top]

> Reverts a single file to a revision from a specified snapshot. The volume used for restoring the file must be online and must not be a mirror. Files other than normal files and LUNs are not restored. This includes directories (and their contents), and files with NT streams. If there is not enough space in the volume, the single file snap restore will not start. If the file already exists (in the active filesystem), it will be overwritten with the version in the snapshot. It could take upto several minutes for before the API invocation returns. During this time client exclusive oplocks are revoked and hard exclusive locks like the DOS compatibility lock are invalidated. Once the invocation returns, the file restore will proceed in the background. During this time, any operation which tries to change the file will be suspended until the restore is done. Also, other singlefile snap restores can be executed. Also it is possible for the single file snap restore to be aborted if we run out of disk space during the operation. When this happens the timestamp of the file being restored will be updated. Thus it will not be the same as the timestamp of the file in the snapshot. An in-progress restore can be aborted by removing the file. For NFS users, the last link to the file must be removed. The snapshot used for the restore cannot be deleted. New snapshots cannot be created while a single-file snaprestore is in progress. Scheduled snapshots on the volume will be suspended for the duration of the restore. Tree, user and group quota limits are not enforced for the owner, group and tree in which the file is being restored. Thus if the user, group or tree quotas are exceeded, /etc/quotas will need to be altered after the single file snap restore operation has completed. Then quota resize will need to be run. When the restore completes, the file's attributes (size, permissions, ownership, etc.) should be identical as those in the snapshot. If the system is halted or crashes while a single file snap restore is in progress then the operation will be restarted on reboot. A volume cannot have both a volume snaprestore and a single-file snaprestore executing simultaneously. Multiple single-file snaprestores can be in progress simultaneously.

> Input Name | Range | Type | Description
> path |  | string | Path of the file to restore.
> restore-path |  | string optional | Path to restore to. The path must be a full path to a filename, and must be in the same volume as the volume used for the restore. If not specified, restore-path is defaulted to the original path.
> snapshot |  | string | Name of snapshot to restore from. Snapshot must be from same volume as the file to restore.

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |
> EINVALIDINPUTERROR |  |

> License
> snaprestore

snapshot-restore-volume | [top]

> Reverts a volume to a specified snapshot. The volume must be online and must not be a mirror. If reverting the root volume, the filer will be rebooted. Non-root volumes do not require a reboot. A volume cannot have both a volume snaprestore and a single-file snaprestore executing simultaneously. Multiple single-file snaprestores can be in progress simultaneously. After the reversion, the volume is in the same state as it was when the snapshot was taken.

> Input Name | Range | Type | Description
> snapshot |  | string | Name of snapshot to restore from.
> volume |  | string | Name of volume to restore.

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |
> EINVALIDINPUTERROR |  |

> License
> snaprestore

snapshot-set-reserve | [top]

> Sets the size of the indicated volume's snapshot reserve to the specified percentage. Reserve space can be used only by snapshots and not by the active file system.

> Input Name | Range | Type | Description
> percentage |  | integer | Percentage to set. Range [0-100].
> volume |  | string | Name of volume on which to set the snapshot space reserve.

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |
> EINVALIDINPUTERROR |  |
> EVOLUMECREATING |  |
> EVOLUMENOTONLINE |  |
> ENOSPC |  |

snapshot-set-schedule | [top]

> Set the snapshot schedule on a specified volume. If number of snapshots requested is greater than ONTAP allows, then ESNAPTOOMANY will be returned with the maximum allow snapshots in the reason.

> Input Name | Range | Type | Description
> days |  | integer optional | Number of snapshots taken daily to keep on line. If not provided, the number of daily snapshots is left at the previous value.
> hours |  | integer optional | Number of snapshots taken hourly to keep on line. If not provided, the number of weekly snapshots is left at the previous value.
> minutes |  | integer optional | Number of snapshots taken minutely to keep on line. If not provided, the number of minutely snapshots is left at the previous value.
> volume |  | string | Name of the volume name where the snapshots are located.
> weeks |  | integer optional | Number of snapshots taken weekly to keep on line. If not provided, the number of weekly snapshots is left at the previous value.
> which-hours |  | string optional | Comma-separated list of the hours at which the hourly snapshots are created. If hours is 0, which-hours is ignored and cleared.
> which-minutes |  | string optional | Comma-separated list of the minutes at which the minutely snapshots are created. If minutes is 0, which-minutes is ignored and cleared.

> Errno | Description
> ESNAPSHOTDOESNOTEXIST |  |
> ESNAPSHOTTOOMANY |  |
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEMOUNTING |  |
> EVOLUMEOFFLINE |  |

snapshot-volume-info | [top]

> Returns snapshot related volume information. The information returned is valid at the time the API call reached the filer and maybe outdated soon after.

> Input Name | Range | Type | Description
> volume |  | string | Name of the volume on which the space needs to be checked.
> Output Name | Range | Type | Description
> size-available |  | integer | Total bytes that when exhausted will disable us from taking snapshots. If this value is 0, snapshots cannot be taken. Any other value would allow us to take a reliable snapshot. This space may or may not get exhausted by taking a snapshot. Also it may get used by writes/allocations in the volume. This is not equal to the free space in the active file system or anyway related to the size of the next snapshot. Range : [0..2^64-1].

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEOFFLINE |  |

Element definition: snapshot-info | [top]

> One snapshot contained in the specified volume.

> Name | Range | Type | Description
> access-time |  | integer | Access time in seconds since Jan 1, 1970.
> busy |  | boolean | True if the snapshot is being used by an application.
> cumulative-percentage-of-total-blocks |  | integer | Percentage of blocks owned by this snapshot and all more recent snapshots, relative to the total number of blocks in the volume.
> cumulative-percentage-of-used-blocks |  | integer | Percentage of blocks owned by this snapshot and all more recent snapshots, relative to the number of blocks currently used in the volume.
> cumulative-total |  | integer | Cumulative total of 1024 byte blocks of this snapshot and previous snapshots. If the "terse" input is true, this value is omitted.
> dependency |  | string | Application that is dependent on this snapshot. The possible values are snapmirror and snapvault.
> name |  | string | Name of the snapshot to be listed.
> percentage-of-total-blocks |  | integer | Percentage of blocks owned by this snapshot, relative to the total number of blocks in the volume.
> percentage-of-used-blocks |  | integer | Percentage of blocks owned by this snapshot, relative to the number of blocks currently used in the volume.
> total |  | integer | Number of 1024 byte blocks in the snapshot. If the "terse" input is true, this value is omitted.

Element definition: snapshot-name | [top]

> Name of a snapshot.

> [none]

Element definition: snapshot-reserve-detail-info | [top]

> Information about a volume's snapshot space reservation configuration.

> Name | Range | Type | Description
> percentage |  | integer | Percentage of volume reserved for snapshots. Range : [0 - 100].
> size |  | integer | Size in bytes of volume reserved for snapshots. Range : [0 - 2^64-1].
> volume |  | string | Name of volume.