# Load a DuckDB database into MotherDuck
> Upload a local DuckDB database file to MotherDuck cloud storage.
MotherDuck supports uploading local DuckDB databases in the cloud as referenced by the [CREATE DATABASE](/sql-reference/motherduck-sql-reference/create-database.md) statement.

### CLI

To create a remote database from the current active local database, execute the following command:

```sql
CREATE OR REPLACE DATABASE remote_database_name FROM CURRENT_DATABASE();
```

To upload an attached local duckdb database, execute the following commands:

```sql
ATTACH '/path/to/local/database.ddb' AS local_db_name;
ATTACH 'md:';
CREATE OR REPLACE DATABASE remote_database_name FROM local_db_name;
```

To upload an duckdb file on disk:

```sql
ATTACH 'md:';
CREATE OR REPLACE DATABASE remote_database_name FROM '/path/to/local/database.ddb';
```

Here's a full end-to-end example:

```sql
-- Let's generate some data based on the tpch extension (will be automatically autoloaded).
-- This will create a couple of tables in the current database.
CALL dbgen(sf=0.1);
-- Connect to MotherDuck
ATTACH 'md:';
CREATE OR REPLACE DATABASE remote_tpch from CURRENT_DATABASE();
```

:::note
Uploading database does not alter context, meaning you are still in the local context after the upload and the query will run locally.
:::


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fkey-tasks%2Floading-data-into-motherduck%2Floading-duckdb-database%2F&page_title=Load%20a%20DuckDB%20database%20into%20MotherDuck&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
