treedb_shoot_snap()

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

tranger

json_t *

Pointer to the tranger instance managing the TreeDB.

treedb_name

const char *

Name of the TreeDB instance to snapshot.

snap_name

const char *

Name assigned to the snapshot.

description

const char *

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