|
APIs in Category: snapshot |
API version 1.6 |
| 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
Vfiler-enabled Yes
| 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
If true, the snapshot is to be created asynchronously. The default value is false. snapshot string
nonempty
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 EONTAPI_ENOMEM EONTAPI_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 EONTAPI_EBUSY EONTAPI_EROFS EONTAPI_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
Vfiler-enabled Yes
| 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-partial-restore-file | [top] |
Restores a particular range of bytes in a file from a specified snapshot. Partial file restores are used to restore particular pieces of LUNs and NFS or CIFS container files that are used by a host to store multiple sources of data. For example, a host may be storing multiple user databases in the same LUN. A partial file restore can be used to restore one of those databases in the LUN while not touching the other databases that are also stored in the LUN.
Partial file restores require significant management by the caller. The caller must understand the metadata of the host LUN or container file so that they can know which bytes belong to the object being restored.
Before the restore operation beings, the caller must quiesce the object being restored. It must remain quiesced for the duration of the restore operation. No host I/O should be issued for the object while it is being restored because the snapshot-partial-restore-file commands will be incrementally restoring the LUN or file and the host will therefore see inconsistent content for the object until the restore operation is completed. Host I/O is permitted for the other objects stored in the LUN or container file because the partial file restore will not touch the bytes belonging to those other objects.
During the restore the caller must issue a snapshot-partial-restore-file command for each of the byte ranges that belong to the object being restored, based on the metadata of the LUN or container file. Once each command returns, that byte range is restored and the changes are persistent. If the filer should halt while processing a command, that byte range of the LUN or container file is inconsistent. Some of the bytes at the beginning of the range may have been restored while bytes at the end of the range have not been restored. Once the filer is rebooted the caller should re-issue the command to restore that byte range to complete the restore.
Once the restore is completed, the caller must purge any host operating system or application buffers that may hold data for the LUN or file that is now stale. For NFS or CIFS mounted volumes the easiest way to purge any host buffers is to unmount and remount the volume. Applications holding buffered data may need to be shut down and restarted.
Multiple partial file restore requests may be issued to the same LUN or file simultaneously. There is no requirement that the requests are all restoring from the same snapshot so that multiple restore operations for different objects may be concurrent on the same file. There is no checking to prevent overlapping byte ranges between requests. Preventing this condition is the responsibility of the caller.
Partial file restores are not intended for restoring parts of normal user-level files that are stored in an NFS or CIFS exported volume. Use snapshot-restore-file to restore normal files like these.
The volume where the LUN or container file to restore and where the snapshot to restore from live must be online and must not be a mirror volume.
The partial file restore request may fail if there is not sufficient free space to overwrite all of the blocks in the byte range to be restored.
The partial file restore request is synchronous, meaning that the command will not return until the entire byte range is restored. The snapshot being restored from cannot be deleted while a request is being executed, but it can be deleted between requests. If this happens the next request will notice that the snapshot has been deleted and will return an error.
The maximum number of bytes of data that can be restored in a single request is given by the max-byte-count value returned by the snapshot-partial-restore-file-list-info command. This limit ensures that requests are periodically interruptible and avoids overloading the filer.
If the system halts while a partial file restore request is being executed, the request will not be restarted upon reboot. Some of the bytes at the beginning of the range may have been restored while bytes at the end of the range have not been restored. The caller should reissue the partial file restore request for that byte range to complete the restore.
Input Name Range Type Description byte-count integer
The number of bytes to restore, beginning at start-byte. The byte count must be a multiple of 4096. Use snapshot-partial-restore-file-list-info to determine the maximum number of bytes that can be restored in a single request. Range : [0 - 2^64-1] path string
The fully qualified path of the file to partially restore. snapshot string
The simple name of the snapshot to restore from. The snapshot must be from same volume as the file to partially restore. start-byte integer
The starting byte offset in the file to partially restore. The first byte of the file is byte zero. The start byte must be a multiple of 4096. Range : [0 - 2^64-1]
Errno Description EINVALIDINPUTERROR
License snaprestore
| snapshot-partial-restore-file-list-info | [top] |
Returns partial file restore settings.
Output Name Range Type Description max-byte-count integer
The maximum number of bytes that can be restored in a single request. This limit ensures that requests are periodically interruptible and avoids overloading the filer. Range : [0 - 2^64-1]
License snaprestore
| 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
Vfiler-enabled Yes
| 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 EONTAPI_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
The volume access time when the snapshot was created in seconds since Jan 1, 1970. This value will not change even if the snapshot is accessed. 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