POST/loaddata

Restore SFTPGo data from a JSON backup

Restores SFTPGo data and configuration from a JSON backup in the request body. Use scan-quota to control quota scanning and mode to choose how imported objects affect existing data. Objects are restored one at a time, so a failure can stop the operation after a partial restore.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 14 body fields
scan-quotaintegeroptional
Controls quota scanning: 0 skips the scan, 1 scans quotas, and 2 scans quotas only for users with quota restrictions. Defaults to 0 when omitted.
Allowed:012
modeintegeroptional
Controls how imported objects affect existing data: 0 adds new objects and updates existing ones, 1 adds new objects without modifying existing ones, and 2 also disconnects connected users to apply the new configuration. Defaults to 0 when omitted.
Allowed:012

JSON backup data to restore. The body can include the data collections and configuration objects listed below.

adminsarray<object>optional
Array of administrator records to restore.
api_keysarray<object>optional
Array of API keys to restore.
configsobjectoptional
the configurations stored in the data provider, as a free form object. Restore them by passing the dumped object unchanged
event_actionsarray<object>optional
Array of event actions to restore.
event_rulesarray<object>optional
Array of event rules to restore.
foldersarray<object>optional
Array of virtual folder records to restore.
groupsarray<object>optional
Array of group records to restore.
ip_listsarray<object>optional
Array of IP list entries to restore.
licenseobjectoptional
the stored license, as a free form object. Restore it by passing the dumped object unchanged
rolesarray<object>optional
Array of role records to restore.
scopesarray<string>optional
the scopes this dump contains. A dump carries every scope it declares
sharesarray<object>optional
Array of share records to restore.
usersarray<object>optional
Array of user records to restore.
versionintegeroptional
Integer identifying the data dump version.

6 status codes
200Returns an operation result object containing `message` and `error` fields.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Returned when the backup request or a query parameter is invalid.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Returned when the request is not authenticated.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Returned when the authenticated user is not permitted to restore data.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Returned when the server encounters an internal error during restoration.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty

Error handling

A 400 is returned when the backup or query values are invalid. A 401 is returned when authentication is missing or invalid. A 403 is returned when the authenticated user is not permitted to restore data. A 500 is returned when the server encounters an error during restoration. The scan-quota query parameter must be 0, 1, or 2, and the mode query parameter must be 0, 1, or 2.