tranger2_backup_topic()
#
Creates a backup of a topic in the TimeRanger database. If backup_path
is empty, the topic path is used. If backup_name
is empty, the backup file is named topic_name.bak
. If overwrite_backup
is true and the backup exists, it is overwritten unless tranger_backup_deleting_callback
returns true.
Prototype
json_t *tranger2_backup_topic(
json_t *tranger,
const char *topic_name,
const char *backup_path,
const char *backup_name,
BOOL overwrite_backup,
tranger_backup_deleting_callback_t tranger_backup_deleting_callback
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The TimeRanger database instance. |
|
|
The name of the topic to back up. |
|
|
The directory where the backup will be stored. If empty, the topic path is used. |
|
|
The name of the backup file. If empty, |
|
|
If true, an existing backup is overwritten unless |
|
|
A callback function that determines whether an existing backup should be deleted before overwriting. |
Return Value
A JSON object representing the new topic backup.
Notes
If overwrite_backup
is true and the backup exists, tranger_backup_deleting_callback
is called. If it returns true, the existing backup is not removed.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples