---
title: "Restore files"
method: POST
path: "/Backup/restore_files"
tags: ["File Restoration"]
---

# Restore files

`POST /Backup/restore_files`

This function restores an account's files.

**Important:**

When the [File Storage role](https://go.cpanel.net/howtouseserverprofiles#roles) is disabled, the system also **disables** this function.

**Note:**

You **must** use the `backup` parameter when you call this function in one of the following formats:
* As part of a `multipart/form-data` request body to upload and restore a backup file to the server. For more information about this structure, read Mozilla's [POST Method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) documentation.
* As a query parameter to restore an existing file on the server.

## Query parameters

- `backup` string
- `directory` string, path
- `timeout` integer
- `verbose` 0 | 1

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `log_id` string — The log file's restoration identification (ID). The system uses the backup restoration's date to create this ID. The ID is in [ISO-8601 Date Time](https://en.wikipedia.org/wiki/ISO_8601) format with the log's revision number appended.
      - `log_path` string, path — The filepath to the backup restoration's log file.
      - `messages` string[] — An array of statements about the database's restoration.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — * `1` - Success * `0` - Failed: Check the errors field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/versions/632e2f8e6d04/schema)
