This is the ThingsDB documentation for version v0, click here for the latest version!
Restore from a backup file created with the new_backup function.
Before using this function the following list of requirements must be must be fulfilled:
FULL
privileges on the@thingsdb
scope.committed_event_id
and stored_event_id
for all nodes. This is not a requirement when using a single node.After running this function, all existing users and tokens will be overwritten, including the user performing the restore unless the take_access
argument will be set to true
. In both cases it is required to re-authenticate to ThingsDB after the restore is completed.
This function generates an event.
restore(filename, [take_access])
Argument | Type | Description |
---|---|---|
filename |
str | Tar file containing the backup, usually a file ending with .tar.gz . |
take_access |
bool (optional) | When true , the users and tokens will not be restored, but instead the user performing the restore will be granted full access to all scopes. Default is false . |
Returns nil
when successful.
Restore from a backup file
restore('/tmp/backup.tar.gz');
Return value in JSON format
null