> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rdp.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Restore Backup

> Overwrites the server with the backup: it is stopped, its disk is replaced and
it is started again. **Everything written since the backup was taken is lost**,
a password changed since included. Follow it in `latest_restore` of
`GET /servers/{server}/backups`.




## OpenAPI

````yaml post /servers/{server}/backups/{backup}/restore
openapi: 3.1.0
info:
  title: APIFiddle Sample Definition
  version: 0.0.0
  description: Example workspace
servers:
  - url: https://rdp.sh/api/v1
    description: Default production endpoint.
security: []
paths:
  /servers/{server}/backups/{backup}/restore:
    post:
      summary: Restore a backup
      description: >
        Overwrites the server with the backup: it is stopped, its disk is
        replaced and

        it is started again. **Everything written since the backup was taken is
        lost**,

        a password changed since included. Follow it in `latest_restore` of

        `GET /servers/{server}/backups`.
      operationId: restoreServerBackup
      parameters:
        - $ref: '#/components/parameters/server'
        - $ref: '#/components/parameters/backup'
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                title: RestoreServerBackupOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - >-
                        The restore has been started. Your server will be
                        stopped and overwritten with the backup.
                  restore:
                    $ref: '#/components/schemas/backupRestore'
          description: The restore was queued.
        '403':
          description: User does not own the server.
        '404':
          description: Server not found, or no backup with this ID on the server.
        '409':
          content:
            application/json:
              schema:
                type: object
                title: RestoreServerBackupConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Only completed backups can be restored.
          description: >
            The backup has not completed, another backup or restore is running,
            or the

            server is suspended or busy.
      security:
        - Authorization: []
components:
  parameters:
    server:
      in: path
      name: server
      schema:
        type: string
      required: true
    backup:
      in: path
      name: backup
      schema:
        type: integer
      required: true
      description: Backup ID
  schemas:
    backupRestore:
      type: object
      required:
        - id
        - backup_id
        - status
      properties:
        id:
          type: integer
          examples:
            - 57
        backup_id:
          type: integer
          examples:
            - 812
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
          examples:
            - running
        progress:
          type: integer
          minimum: 0
          maximum: 100
          examples:
            - 40
        error:
          type:
            - string
            - 'null'
          description: Why the restore failed, once it has.
        created_at:
          type: string
        started_at:
          type:
            - string
            - 'null'
        finished_at:
          type:
            - string
            - 'null'
      description: A restore of a backup onto its server.
  securitySchemes:
    Authorization:
      in: header
      name: Authorization
      type: apiKey
      description: |
        Your API key as it is, without `Bearer`. API access is off for new
        accounts: until it is turned on under Settings > API, every request
        answers `403` with `API access is turned off for this account. Turn it
        on under Settings > API.` If the account lists allowed IPs, a request
        from any other address answers `403` with `This API key is not allowed
        from <address>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.