---
title: "restore"
method: POST
path: "/v1/db/restore"
tags: ["v1", "db"]
---

# restore

`POST /v1/db/restore`

#### Controller: 

`github.com/ubccr/grendel/internal/api.(*Handler).Restore`

#### Middlewares:

- `github.com/go-fuego/fuego.defaultLogger.middleware`
- `github.com/ubccr/grendel/internal/api.(*Handler).authMiddleware`

---

Restore a backup of the DB

## Headers

- `Accept` string

## Request body

- DataDump — DataDump schema
  - `Hosts` object[]
    - `bonds` object[]
      - `bmc` boolean
      - `fqdn` string
      - `id` integer, nullable
      - `ifname` string
      - `ip` string
      - `mac` string
      - `mtu` integer
      - `peers` string[]
      - `vlan` string
    - `boot_image` string
    - `firmware` string
    - `id` integer, nullable
    - `interfaces` object[]
      - `bmc` boolean
      - `fqdn` string
      - `id` integer, nullable
      - `ifname` string
      - `ip` string
      - `mac` string
      - `mtu` integer
      - `vlan` string
    - `name` string
    - `provision` boolean
    - `tags` string[], nullable
    - `uid` string, nullable
  - `Images` object[]
    - `cmdline` string
    - `id` integer, nullable
    - `initrd` string[]
    - `kernel` string
    - `liveimg` string
    - `name` string
    - `provision_templates` object, nullable
    - `uid` string, nullable
    - `verify` boolean
  - `Roles` object[]
    - `name` string
    - `permission_list` object[]
      - `method` string
      - `path` string
    - `unassigned_permission_list` object[]
      - `method` string
      - `path` string
  - `Users` object[]
    - `created_at` string, date-time
    - `enabled` boolean
    - `hash` string
    - `id` integer
    - `modified_at` string, date-time
    - `role` string
    - `username` string

## Response `200`

OK

- GenericResponse — GenericResponse schema
  - `changed` integer
  - `detail` string
  - `title` string

## Other responses

- `default` — Default Error

## Changes

- **2026-07-01** `cd871b115a7b` — 1 info
  - added the new optional request property `Roles`
- **2025-07-18** `20bff94216e2` — 1 breaking, 3 warning, 1 info
  - the request property `Users/items/id` became not nullable
  - removed the request property `Images/items/butane`
  - removed the request property `Images/items/provision_template`
  - removed the request property `Images/items/user_data`
  - …1 more
- **2025-04-25** `26459b338dbb` — 1 info
  - added the new optional request property `Users/items/enabled`
- **2025-03-21** `9e09e176e964` — 1 info
  - endpoint added
- **2024-12-03** `29c6a9c3f49b` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ubccr/apis/grendel-api/changes/v1/db/restore/post.md)

---

[API](https://skmtc.dev/ubccr/apis/grendel-api.md) · [All operations](https://skmtc.dev/ubccr/apis/grendel-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ubccr/grendel-api/revisions/62eb4acab992/schema)
