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

# Create a database restore

> Restore a database cluster from a point in time or snapshot. Returns the newly created database.



## OpenAPI

````yaml https://cloud.laravel.com/api-docs/api.json post /databases/clusters/{database}/restore
openapi: 3.1.0
info:
  title: Laravel Cloud
  version: 0.0.1
servers:
  - url: https://cloud.laravel.com/api
security:
  - http: []
tags:
  - name: Applications
  - name: Environments
  - name: Domains
  - name: Commands
  - name: Deployments
  - name: Instances
  - name: Background Processes
  - name: Database Clusters
  - name: Databases
  - name: Database Snapshots
  - name: Database Restores
  - name: Object Storage Buckets
  - name: Bucket Keys
  - name: Caches
  - name: WebSocket Clusters
  - name: WebSocket Applications
  - name: Dedicated Clusters
  - name: Usage
  - name: Meta
  - name: Databases (Legacy)
paths:
  /databases/clusters/{database}/restore:
    post:
      tags:
        - Database Restores
      summary: Create a database restore
      description: >-
        Restore a database cluster from a point in time or snapshot. Returns the
        newly created database.
      operationId: public.databases.clusters.restore
      parameters:
        - name: database
          in: path
          required: true
          description: The database identifier
          schema:
            type:
              - string
              - 'null'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreDatabaseRestoreRequest'
      responses:
        '201':
          description: '`DatabaseResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DatabaseResource'
                  included:
                    type: array
                    items:
                      $ref: '#/components/schemas/DatabaseSchemaResource'
                required:
                  - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreDatabaseRestoreRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the new database created from the restore.
          pattern: ^[a-z0-9_-]+$
          minLength: 3
          maxLength: 40
        restore_time:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The point in time to restore the database to. Must not be used with
            database_snapshot_id.
        database_snapshot_id:
          type:
            - string
            - 'null'
      required:
        - name
      title: StoreDatabaseRestoreRequest
    DatabaseResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - databases
        attributes:
          type: object
          properties:
            name:
              type: string
            type:
              $ref: '#/components/schemas/DatabaseType'
            status:
              $ref: '#/components/schemas/DatabaseStatus'
            region:
              $ref: '#/components/schemas/CloudRegion'
            created_at:
              type:
                - string
                - 'null'
              format: date-time
            config:
              description: Configuration object. Fields vary based on database type.
              oneOf:
                - title: Neon Serverless Postgres
                  type: object
                  description: Configuration for Neon Serverless Postgres databases
                  properties:
                    cu_min:
                      type: number
                      description: Minimum compute units for auto-scaling
                      enum:
                        - 0.25
                        - 0.5
                        - 1
                        - 2
                        - 4
                        - 8
                        - 10
                    cu_max:
                      type: number
                      description: Maximum compute units for auto-scaling
                      enum:
                        - 0.25
                        - 0.5
                        - 1
                        - 2
                        - 4
                        - 8
                        - 10
                    suspend_seconds:
                      type: integer
                      description: >-
                        Seconds of inactivity before hibernation (0 = never)
                        (min: 0, max: 604800)
                    retention_days:
                      type: integer
                      description: >-
                        Days to retain point-in-time recovery data (min: 0, max:
                        30)
                  required:
                    - cu_min
                    - cu_max
                    - suspend_seconds
                    - retention_days
                - title: Laravel MySQL
                  type: object
                  description: Configuration for Laravel MySQL databases
                  properties:
                    size:
                      type: string
                      description: Instance size for the database cluster
                      enum:
                        - db-flex.m-1vcpu-512mb
                        - db-flex.m-1vcpu-1gb
                        - db-flex.m-1vcpu-2gb
                        - db-flex.m-1vcpu-4gb
                        - db-pro.m-1vcpu-4gb
                        - db-pro.m-2vcpu-8gb
                        - db-pro.m-4vcpu-16gb
                        - db-pro.m-8vcpu-32gb
                    storage:
                      type: integer
                      description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
                    is_public:
                      type: boolean
                      description: Whether the database is publicly accessible
                    uses_scheduled_snapshots:
                      type: boolean
                      description: Whether scheduled backups are enabled
                    retention_days:
                      type: integer
                      description: 'Days to retain backup data (min: 0, max: 30)'
                    maintenance_window:
                      type:
                        - string
                        - 'null'
                      description: UTC maintenance window for automated updates
                      example: sun:06:00-sun:06:30
                    suspend_seconds:
                      type: integer
                      description: >-
                        Seconds of inactivity before scaling to zero (0 =
                        never). Requires an eligible size and the scale-to-zero
                        feature. (min: 0, max: 3600)
                  required:
                    - size
                    - storage
                    - is_public
                    - uses_scheduled_snapshots
                    - retention_days
                - title: AWS RDS
                  type: object
                  description: Configuration for AWS RDS MySQL databases
                  properties:
                    size:
                      type: string
                      description: Instance size for the database cluster
                      enum:
                        - db.m8g.large
                        - db.m8g.xlarge
                        - db.m8g.2xlarge
                        - db.m8g.4xlarge
                        - db.m8g.8xlarge
                        - db.m8g.12xlarge
                        - db.m8g.16xlarge
                        - db.m8g.24xlarge
                        - db.m8g.48xlarge
                        - db.m7g.large
                        - db.m7g.xlarge
                        - db.m7g.2xlarge
                        - db.m7g.4xlarge
                        - db.m7g.8xlarge
                        - db.m7g.12xlarge
                        - db.m7g.16xlarge
                        - db.t4g.micro
                        - db.t4g.small
                        - db.t4g.medium
                        - db.t4g.large
                        - db.t4g.xlarge
                        - db.t4g.2xlarge
                    storage:
                      type: integer
                      description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
                    is_public:
                      type: boolean
                      description: Whether the database is publicly accessible
                    uses_pitr:
                      type: boolean
                      description: Whether point-in-time recovery is enabled
                    retention_days:
                      type: integer
                      description: 'Days to retain backup data (min: 0, max: 30)'
                    maintenance_window:
                      type:
                        - string
                        - 'null'
                      description: UTC maintenance window for automated updates
                      example: sun:06:00-sun:06:30
                    deployment_option:
                      type: string
                      description: Deployment configuration (single-az or multi-az)
                      enum:
                        - single-az
                        - single-az-with-read-replicas
                        - multi-az
                    read_replicas:
                      type:
                        - integer
                        - 'null'
                      description: The number of configured read replicas
                  required:
                    - size
                    - storage
                    - is_public
                    - uses_pitr
                    - retention_days
                    - deployment_option
              discriminator:
                propertyName: type
                mapping:
                  laravel_mysql_84: '#/components/schemas/LaravelMysqlConfig'
                  laravel_mysql_8: '#/components/schemas/LaravelMysqlConfig'
                  aws_rds_mysql_8: '#/components/schemas/AwsRdsConfig'
                  aws_rds_postgres_18: '#/components/schemas/AwsRdsConfig'
                  neon_serverless_postgres_18: '#/components/schemas/NeonServerlessConfig'
                  neon_serverless_postgres_17: '#/components/schemas/NeonServerlessConfig'
                  neon_serverless_postgres_16: '#/components/schemas/NeonServerlessConfig'
            connection:
              type: object
              properties:
                hostname:
                  type: string
                port:
                  type: integer
                  enum:
                    - 3306
                    - 5432
                protocol:
                  type: string
                  enum:
                    - mysql
                    - postgres
                driver:
                  type: string
                  enum:
                    - mysql
                    - pgsql
                username:
                  type: string
                password:
                  type: string
              required:
                - hostname
                - port
                - protocol
                - driver
                - username
                - password
          required:
            - name
            - type
            - status
            - region
            - created_at
            - config
            - connection
        relationships:
          type: object
          properties:
            schemas:
              type: object
              description: 'TODO: Remove the schemas relationship by March 2026.'
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/DatabaseSchemaResourceIdentifier'
              required:
                - data
            databases:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/DatabaseSchemaResourceIdentifier'
              required:
                - data
      required:
        - id
        - type
      title: DatabaseResource
    DatabaseSchemaResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - databaseSchemas
        attributes:
          type: object
          properties:
            name:
              type: string
            status:
              type: string
            created_at:
              type:
                - string
                - 'null'
              format: date-time
          required:
            - name
            - status
            - created_at
        relationships:
          type: object
          properties:
            database:
              type: object
              properties:
                data:
                  anyOf:
                    - $ref: '#/components/schemas/DatabaseResourceIdentifier'
                    - type: 'null'
              required:
                - data
            environments:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/EnvironmentResourceIdentifier'
              required:
                - data
      required:
        - id
        - type
      title: DatabaseSchemaResource
    DatabaseType:
      type: string
      enum:
        - laravel_mysql_84
        - laravel_mysql_8
        - aws_rds_mysql_8
        - aws_rds_postgres_18
        - neon_serverless_postgres_18
        - neon_serverless_postgres_17
        - neon_serverless_postgres_16
      title: DatabaseType
    DatabaseStatus:
      type: string
      enum:
        - creating
        - updating
        - restarting
        - upgrading
        - moving
        - available
        - stopped
        - restoring
        - restore_failed
        - disabled
        - snapshotting_before_archiving
        - archiving
        - archived
        - deleting
        - deleted
        - unknown
      title: DatabaseStatus
    CloudRegion:
      type: string
      enum:
        - us-east-2
        - us-east-1
        - ca-central-1
        - eu-central-1
        - eu-west-1
        - eu-west-2
        - me-central-1
        - ap-southeast-1
        - ap-southeast-2
        - ap-northeast-1
      title: CloudRegion
    DatabaseSchemaResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - databaseSchemas
        id:
          type: string
      required:
        - type
        - id
      title: DatabaseSchemaResourceIdentifier
    DatabaseResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - databases
        id:
          type: string
      required:
        - type
        - id
      title: DatabaseResourceIdentifier
    EnvironmentResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - environments
        id:
          type: string
      required:
        - type
        - id
      title: EnvironmentResourceIdentifier
  responses:
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      description: The Bearer Token generated on the Cloud UI.
      scheme: bearer
      bearerFormat: bearer

````