treedb_shoot_snap()
#
treedb_shoot_snap()
tags the current state of a TreeDB instance, creating a snapshot with an associated name and description.
Prototype
int treedb_shoot_snap(
json_t *tranger,
const char *treedb_name,
const char *snap_name,
const char *description
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the |
|
|
Name of the TreeDB instance to snapshot. |
|
|
Name assigned to the snapshot. |
|
|
Optional description providing details about the snapshot. |
Return Value
Returns 0
on success, or a negative error code on failure.
Notes
Snapshots allow restoring the TreeDB to a previous state using treedb_activate_snap()
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples