Each snapshot is described in YCPMap. Snapshot is identified by number. The map also contains the snapshot type (`SINGLE, `PRE, `POST) and the date of snapshot creation. SINGLE and PRE types of snapshot have the description string. The snapshot of PRE type contains number of relevant POST snapshot and vice versa.
Note: The complete development documentation is available in the autodocs/ directory.
Path | Argument | Type of Result | Result |
---|---|---|---|
.snapper.error | (none) | YCPMap | Return information about last error. Example of result: $[ "type" : "config_not_found" ] |
.snapper.path | YCPMap | YCPMap | Return the path to directory with given snapshot Example of argument map: $[ "num" : 1, $]Example of result: "/snapshots/1/snapshot" |
.snapper.snapshots | (none) | YCPList | Return list of current snapshot maps. Example of result: [ $[ "date" : 1297364138, "description" : "before yast2-users", "name" : "1", "num" : 1, "post_num" : 2, "type" : `PRE ], $[ "date" : 1297364204, "name" : "2", "num" : 2, "pre_num" : 1, "type" : `POST ], $[ "date" : 1297758106, "description" : "Tuesday", "name" : "3", "num" : 3, "type" : `SINGLE ] ] |
.snapper.diff_list | YCPMap | YCPList | Returns the list of files modified between given snapshots.
Each file is described by YCPMap which contains file path and type of the change.
Argument map contains 2 integers, identifying the snapshots. Example of argument map: $[ "from" : 1, "to" : 2 $]Example of result: [ $[ "changes" : "c...", "name" : "/etc/group" ], $[ "changes" : "c...", "name" : "/etc/group.YaST2save" ] ] |
.snapper.diff_index | YCPMap | YCPMap | Returns the differences between snapnots num1 and num2 as one-level map
(mapping each file to its changes). Example of argument map: $[ "from" : 1, "to" : 2 $]Example of result: $[ "/etc/group" : "c...", "/etc/group.YaST2save" : "c..." ] |
.snapper.diff_tree | YCPMap | YCPMap | Returns the differences between snapnots num1 and num2 as a tree.
Map is recursively describing the filesystem structure; it is used to build Tree widget contents
in yast2-snapper UI.
Example of argument map: $[ "from" : 1, "to" : 2 $]Example of result: $[ "etc" : $[ "group" : $[], "group.YaST2save" : $[], "passwd" : $[], "passwd.YaST2save" : $[] ], "var" : $[ "log" : $[ "YaST2" : $[ "y2changes" : $[], "y2log" : $[] ], "messages" : $[], "snapper.log" : $[] ] ] ] |
Path | Argument | Type of Result | Result |
---|---|---|---|
.snapper | (none) | YCPBoolean | Initializes snapper object. In case of init failure, sets the internal error ID. Use Read (.snapper.error) to get the error info. |
.snapper.rollback | YCPMap | YCPBoolean | Rollback the list of given files from snapshot num1 to num2. If num2 is not present,
current system is used as a default.
Example of argument map:
$[ "files" : [ "/etc/passwd", "/etc/group" ] "from" : 1, $] |
Jiri Suchomel <jsuchome@suse.cz>