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

# Backup database

> Dumps the internal database in SQL format (SQLite only).
Requires root token authentication.




## OpenAPI

````yaml /oss/api/openapi.yml get /v1/sys/backup
openapi: 3.0.3
info:
  title: Databunker API
  description: >
    Databunker is a super-fast, open-source vault built with Go for secure
    storage of sensitive personal records.


    ## Authentication

    All API requests require authentication using the `X-Bunker-Token` header.
    This token is your root access token.


    ## Content Types

    The API supports the following content types for POST and PUT requests:

    - `application/json`

    - `application/x-www-form-urlencoded`


    ## User Tokens

    Keep the user `{token}` generated by Databunker private, as it serves as an
    additional user identifier.

    Under GDPR, this user token is referred to as a pseudonymized identity.


    For more details, visit: https://databunker.org/
  version: 1.0.0
  contact:
    name: Databunker Support
    url: https://databunker.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:3000
    description: Local development server
security:
  - ApiKeyAuth: []
tags:
  - name: User
    description: User personal information management
  - name: User App
    description: Additional user application data
  - name: Session
    description: Secure session storage
  - name: Consent
    description: User consent management
  - name: Agreement
    description: Agreement management
  - name: Request
    description: User privacy requests (GDPR)
  - name: Audit
    description: Audit log access
  - name: Expiration
    description: Data expiration and retention
  - name: System
    description: System administration
paths:
  /v1/sys/backup:
    get:
      tags:
        - System
      summary: Backup database
      description: |
        Dumps the internal database in SQL format (SQLite only).
        Requires root token authentication.
      operationId: backupDatabase
      responses:
        '200':
          description: Database backup
          content:
            application/sql:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  responses:
    Unauthorized:
      description: Unauthorized - invalid or missing token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing:
              summary: Missing token
              value:
                status: error
                message: missing X-Bunker-Token header
    Forbidden:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
          example: error
        message:
          type: string
          description: Error description
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Bunker-Token
      description: Root access token for Databunker API

````