---
title: blossom database:import
url: "/docs/reference/cli/database/import/"
canonical_url: https://docs.blossom88.com/docs/reference/cli/database/import/
markdown_url: https://docs.blossom88.com/docs/reference/cli/database/import.md
summary: Import an upload or Backup into a new Database
categories:
- cli
- reference
---

# blossom database:import

Import an upload or Backup into a new Database

## Usage

    blossom database:import [--upload UPLOAD] [--backup BACKUP] [--database_instance DATABASE_INSTANCE] [--data DATA] [--follow] [--timestamps]

## Flags

| Flag | Description |
| --- | --- |
| `--upload` | Completed database upload id |
| `--backup` | Completed PostgreSQL export Backup id |
| `--database_instance` | Destination database instance id (or set import.database_instance_id in --data) |
| `--data, -d` | YAML or JSON data, a path to a data file, or an HTTP(S) URL |
| `--follow, -f` | Follow import logs |
| `--timestamps` | Show log timestamps. Default: true. |

Import a completed upload or a Blossom PostgreSQL dump Backup into a **new**
Database. Existing databases are never overwritten. Source and destination
must belong to the selected Account.

    blossom database:import --upload database_upload-... --database_instance database_instance-... --data '{"import":{"name":"my_app"}}' --follow
    blossom database:import --backup backup-... --database_instance database_instance-... --data '{"import":{"name":"review_data"}}' --follow

Choose exactly one of `--upload` or `--backup`. The destination can also be
`import.database_instance_id` in the data; if both are supplied, they must match.
Backup imports require `backup:read` in addition to `database:write`.

The default import deadline is six hours, covering download, verification and
restore. Set `import.timeout_seconds` from 60 to 86400 for this operation.
The archive ceiling is 100 GiB. Large-limit qualification is still in progress.

One compressed archive is staged on the destination Volume. Leave additional
space for restored data, indexes and WAL: compressed size cannot predict these.
The Agent checks available space before staging and stops restore when free
space falls below the greater of 1 GiB or 10% of the Volume. Expand storage
before retrying a space failure.

A checksum or PostgreSQL compatibility failure leaves the new Database failed.
`database:retry --id DATABASE_ID --follow` retries while its source is retained.
Completed imports preserve subsequent writes when replayed. Delete a failed
Database to abandon it. Upload expiry never deletes an imported Database.

Pause writes at the old host before the final export and cutover. This is a
one-time dump import, not continuous replication or a zero-downtime migration.
