APIs in Category: snapdiff
API version 1.8

 
snapdiff-iter-end
snapdiff-iter-next
snapdiff-iter-start
snapdiff-iter-status

NetApp Manage ONTAP
 
snapdiff-iter-end [top]

Close or Abort a snapdiff operation. If there is no outstanding snapdiff-iter-next request from the client then this function will close the current session regardless of the number of diffs received. If a snapdiff-iter-next request is currently outstanding from this client then this function is considered an abort and will cause the current request to abort. In the case of abort, the snapdiff-iter-next function may or may not return. This function will always return. Regardless of state, abort will terminate the session.
Input Name Range Type Description
session-id string
This is the session id returned from the snapdiff-iter-start request.
 Errno  Description
 ESNAPDIFFINVINPUT
 ESNAPDIFFINVALIDSESSION

 
snapdiff-iter-next [top]
List the first or next set of changes between 2 snapshots in the same volume or qtree. This is either the first set or a continuation of the diffs from the previous call to this function.
Input Name Range Type Description
session-id string
This is the session identifier returned from the snapdiff-iter-start request.
 
Output Name Range Type Description
num-changes integer
optional
The current number of changes being returned. range: [0..4095]
progress integer
optional
Percentage of inodes processed if diff is a full-volume diff. range: [0..100]
snapshot-changes change-rec[]
optional
Array of change records. Each record describes a single inode change.
 Errno  Description
 ESNAPDIFFINTERROR
 ESNAPDIFFINVALIDSESSION
 ESNAPDIFFSNAPSHOTCHANGED
 ESNAPDIFFVOLOFFLINE

 
snapdiff-iter-start [top]
Establish a session for a snapdiff operation.
Input Name Range Type Description
atime boolean
optional
This is the option that if the atime-only-changed inode is reported
base-snapshot string
optional
This is the name of the base snapshot. This describes the beginning time for the difference operation. It will have one of the following formats: "[snapshot-name]" or "[volume-name][/subdir-1/subdir-2]" If the path is the snapshot for the entire volume then a volume diff is performed. If the path is the snapshot for a qtree then a qtree diff is performed. If this snapshot is not specified, then all files in the diff snapshot will be returned.
diff-snapshot string
This is the name of the difference snapshot. The diff-snapshot is the end time for the difference operation.
max-diffs integer
This is the maximum number of changes to be returned by each call to snapdiff-iter-next. range: [256..4096]
volume string
This is the name of the volume containing the base and' diff snapshots. The name should not have "/vol/" prepended to it.
 
Output Name Range Type Description
session-id string
optional
This is the session id to be used throughout the entire session. It allows the filer to associate client requests with the session allocated to it. It is in uuid format. This value is not returned if there was an error initializing the session.
 Errno  Description
 ESNAPDIFFMAXSESSIONSEXCEEDED
 ESNAPDIFFINTERROR
 ESNAPDIFFINVINPUT
 ESNAPDIFFINVSNAPSHOT
 ESNAPDIFFSNAPSHOTEARLIER
 ESNAPDIFFNOI2P
 EVOLUMEDOESNOTEXIST

 
snapdiff-iter-status [top]
Report status of current session. This is used to determine if the filer is still responding and/or working on the current request. This is needed because some operations can take a long time and the client needs a way to maintain the session.
Input Name Range Type Description
session-id string
This is the session id returned from the snapdiff-iter-start request.
 
Output Name Range Type Description
session-status string
optional
The status of the current session. The possible values are: "snapdiff_status_active" -- Returned if snapdiff-iter-next for this session is currently active. "snapdiff_status_inactive" -- Returned if no snapdiff-iter-next for this session is active but the session is valid. "snapdiff_status_aborting" - An abort of the current request is being processed.
 Errno  Description
 ESNAPDIFFINVINPUT
 ESNAPDIFFINVALIDSESSION

 
Element definition: change-rec [top]
Information about a single inode change.
Name Range Type Description
atime integer
Last asscess time of the file. The value is in seconds since January 1, 1970. Range : [0..2^31-1]
change-type string
Indicates what type of change occurred to the inode. It can have one of the following values: "create" "modify" "delete"
crtime integer
Creation time of the file. The value is in seconds. since January 1, 1970. Range : [0..2^31-1]
ctime integer
Last changed time of the file. The value is in seconds since January 1, 1970. Range : [0..2^31-1]
dos-bits integer
DOS bit settings for the inode. The DOS bits are a logical OR of the following values: 0x00000001 DOS_ARCHIVE 0x00000002 DOS_HIDDEN 0x00000004 DOS_SYSATTR 0x00000008 DOS_COMPRESSED 0x00000010 DOS_NOT_CONTENT_INDEXED 0x00000020 DOS_ENCRYPTED 0x00000040 DOS_OFFLINE 0x00000080 DOS_SPARSE
fattr integer
The inode's unix permissions. It's similar to Unix style permission bits, the only difference being that it is in decimal instead of octal. It is expected from the caller to convert this to octal. In octal, 0755 gives read/write/execute permissions to owner and read/execute to group and other users. It consists of 4 digits derived by adding up bits 4, 2 and 1. Omitted digits are assumed to be zeros. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. The second digit selects permission for the owner of the file: read (4), write (2) and execute (1); the third selects permissions for other users in the same group; the fourth for other users not in the group. range: [0..0xFFF]
filename string
The full pathname of the file the inode points to.
ftype integer
Type of the file. It can be one of the following type: File Type Value ------------- ------- Regular 01 Directory 02 Block device 03 Char. device 04 Symlink 05 Socket 06 FIFO 07
group integer
The inode owner's group id. range: [0..2^31-1]
inode integer
wafl inode number. range: [0x67..0xFFFFFFFF]
links integer
Inode link reference count. range: [0..2^31-1]
mtime integer
Last modification time of the file. The value is in seconds since January 1, 1970. Range : [0..2^31-1]
owner integer
The inode owner's user id. range: [0..2^31-1]
size integer
File byte count. Range : [0..2^31-1]