APIs in Category: snapshot
API version 1.5

 
snapshot-autodelete-list-info
snapshot-autodelete-set-option
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-autodelete-list-info [top]

Returns the current snapshot autodelete settings.
Input Name Range Type Description
volume string
Name of the existing volume for which we want snapshot autodelete settings
 
Output Name Range Type Description
options snapshot-autodelete-info[]
List of snapshot autodelete options for this volume.
 Errno  Description
 EVOLUMEDOESNOTEXIST
 EVOLUMEMOUNTING
 EVOLUMEOFFLINE
 EVOLUMEBUSY

 
snapshot-autodelete-set-option [top]
Set the option named 'option-name' to the value specified by 'option-value' in the autodelete settings of the specified volume.
Input Name Range Type Description
option-name string
Name of the option to be set. Possible values:
"state" (value: "on" | "off")
This option determines if the snapshot autodelete is currently enabled for the volume. Setting the option to "on" switches on the snapshot autodelete for the volume. Setting the option to "off" switches off the snapshot autodelete for the volume.

"commitment" (value: "try" | "disrupt" )
This option determines the snapshots which snapshot autodelete is allowed to delete to get back space. Setting this option to "try" only permits the snapshots which are not locked by data protection utilities (dump, mirroring, NDMPcopy) and data backing functionalities (volume and LUN clones) to be deleted. Setting this option to "disrupt" only permits the snapshots which are not locked by data backing functionalities (volume and LUN clones) to be deleted.

"trigger" (value: "volume" | "snap_reserve" | "space_reserve")
This option determines the condition in which snapshots should be automatically deleted. Setting this option to "volume" triggers snapshot autodelete to run when the volume is near full. Setting this option to "snap_reseve" triggers snapshot autodelete to run when the snap reserve of the volume is near full. Setting this option to "space_reserve" triggers snapshot autodelete to run when the space reserved in the volume is near full.

"target_free_space" (value: < number >)
This option determines when snapshot autodelete should stop deleting snapshot. Depending on the trigger, snapshots are deleted till we reach the target free space percentage.

"delete_order" (value: newest_first | oldest_first)
This option determines if the oldest or newest snapshot is deleted first.

"defer_delete" (value: scheduled | user_created | prefix | none)
This option determines which kind of snapshots to delete in the end. Setting this option value to "scheduled" will delete the snapshots created by the snapshot scheduler last. Setting this option value to "user_created" will delete the snapshots not created by the snapshot scheduler last. Setting this option value to "prefix" will delete the snapshots matching the prefix string to be deleted last. Setting this option value to "none" will disable the above choices.

"prefix" (value: < string >)
This option can be set to provide the prefix string for the "prefix" value of the "defer_delete" option. The prefix string length can be 15 char long.

option-value string
The value to set the named option
volume string
Name of the volume for which we want to change autodelete settings.
 Errno  Description
 EVOLUMEDOESNOTEXIST
 EVOLUMEMOUNTING
 EVOLUMEOFFLINE
 EVOLUMEBUSY

 
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
 Vfiler-enabled
 Yes

 
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
 Vfiler-enabled
 Yes

 
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
 Vfiler-enabled
 Yes

 
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
snapowners boolean
optional
If set to true, owners of the busy snapshot are returned. If false, or if the option is omitted, the list of owners is not returned.
target-name string
optional
Name of the object on which to list the snaplist information. Arguments "target-name" and "target-type" should be used together. Arguments "volume" and ("target-name", "target-type") pair are mutually exclusive. One and only one of them should be specified.
target-type string
optional
Type of the object on which to list the snaplist information. Possible values: volume, aggregate.
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
optional
Name of the volume on which to list the snaplist information. It is for backward compatibility. The recommended usage is to use arguments ("target-name", "target-type") pair.
 
Output Name Range Type Description
snapshots snapshot-info[]
 Errno  Description
 EVOLUMEDOESNOTEXIST
 EVOLUMEMOUNTING
 EVOLUMEOFFLINE
 Vfiler-enabled
 Yes

 
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.
 Vfiler-enabled
 Yes

 
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 up to 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.

For normal files while the restore is proceeding, any operation which tries to change the file will be suspended until the restore is done. The restore may take a long time to complete depending on the size of the file being restored. The file is unavailable for use during this time.

For LUNs that are restored over top of their existing LUN, a LUN clone is created that is backed by the snapshot being restored from and then the clone is split. While the restore is proceeding the LUN is available and I/O (both reads and writes) is permitted. Data that is modified in the LUN while the restore is proceeding will not be overwritten by the restore process. The restore may take a long time to complete depending on the size of the LUN being restored. Use lun-clone-status-list-info to see the progress of the LUN restore.

Other single file snap restores can be executed concurrently. 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.

For normal files, an in-progress restore can be aborted by removing the file. For NFS users, the last link to the file must be removed.

For LUNs that are restored over top of their existing LUN, an in-progress restore can be aborted by using lun-clone-stop. The restored LUN will still be a clone in this case and it will still be partially backed by the snapshot it was restored from.

For all restored files, 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
 Vfiler-enabled
 Yes
 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
 Vfiler-enabled
 Yes

 
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
 Vfiler-enabled
 Yes

 
Element definition: snapshot-autodelete-info [top]
Option name and value.
Name Range Type Description
option-name string
Option key.
option-value string
Option value.

 
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(s) dependent on this snapshot. Possible values include "snapmirror", "snapvault", "dump", "vclone", "LUNs", "snaplock". Comma separated if more than one application depends on this snapshot.
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.
snapshot-owners-list snapshot-owner[]
optional
The list of owners of a busy snapshot.
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.

 
Element definition: snapshot-owner [top]
owner of a busy snapshot
Name Range Type Description
owner string
Name of the owner of a busy snapshot