# Migrating Datasets to the Tensor Database

## How to migrate existing Deep Lake datasets to the Tensor Database

Datasets are created in the Tensor Database by specifying the `dataset_path = "hub://<org_id>/<dataset_name>"` and `runtime = {"db_engine": True})` during dataset creation. If datasets are currently stored locally, in your could, or in non-database Activeloop storage, they can be migrated to the Tensor Database using:

```python
ds_tensor_db = deeplake.deepcopy(src = <current_path>, 
                                 dest = "hub://<org_id>/<dataset_name>", 
                                 runtime = {"db_engine": True}, 
                                 src_creds = {<creds_dict>}, # Only necessary if src is in your cloud
                                 )
```
