File Restoration
Restore file or directory
This function restores a file or directory from a backup to the file or directory's original location.
Important:
When you disable the File Storage role, the system disables this function.
get/Restore/restore_file
Query parameters
The backup's identification.
- YYYY-MM-DD — Restore a daily backup from the specified backup date.
- incremental — Restore a daily incremental backup.
- weekly/YYYY-MM-DD — Restore a weekly backup from the specified backup date.
- monthly/YYYY-MM-DD — Restore a monthly backup from the specified backup date.
- weekly/incremental — Restore a weekly incremental backup.
- monthly/incremental — Restore a monthly incremental backup.
overwrite1 | 0 required
Example:1
Whether to overwrite the file or directory on the disc with its backup replacement.
- 1 — Overwrite the file or directory.
- 0 — Do not overwrite the file or directory.
pathstring path required
Example:/public_html/index.php
The absolute file or directory's path, within a backup, that you wish to restore.
Important:
- The value of this parameter must begin with a forward slash (/).
- You must parse filenames properly to prevent a cross-site scripting (XSS) attack.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "restore_file",
"module": "Restore",
"result": {
"data": {
"success": 1
},
"status": 1
}
}