---
title: "Restore account backup"
method: GET
path: "/restoreaccount"
tags: ["Account Restoration", "Restore Account"]
---

# Restore account backup

`GET /restoreaccount`

This function restores an account backup. You can use this function to restore daily,
weekly, or monthly backups.

**Important:**

* When you call this function, you **must** include at least one of
the `all`, `mail`, `subs`, or `mysql` parameters.

* On servers with a custom `Whostmgr::Transfers` module, the function may not return XML
output. To properly return XML output, the `Whostmgr::Transfers` module **must** allow
the system to use the `Cpanel::Demultiplexer` module to capture output.

**Note:**

On servers that run CentOS 7, you may see a `named` warning about the absence of SPF
resource records on DNS.

* This warning is not relevant on CentOS 7 servers, because
[RFC 7208 deprecated SPF records](https://tools.ietf.org/html/rfc7208).
CentOS 7 servers use `TXT` records instead of `SPF` records.

* Red Hat 7.1 and CentOS 7.1 both contain `bind-9.9.4-23.el7`, which is an updated
version of BIND that complies with RFC 7208. To resolve this issue, update your
operating system to a version that contains the updated version of BIND. For more
information, read the
[Red Hat Bugzilla case about SPF record errors](https://bugzilla.redhat.com/show_bug.cgi?id=1215164).

## Query parameters

- `type` 'monthly' | 'weekly' | 'daily', required
- `user` string, required
- `all` 0 | 1
- `ip` 0 | 1
- `mail` 0 | 1
- `mysql` 0 | 1
- `subs` 0 | 1

## Response `200`

HTTP Request was successful.

- object
  - `metadata` object
    - `command` string — The method name called.
    - `output` object
      - `raw` string — An output message that may contain long HTML.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` — Success. * `0` — Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
