# Full data migration - Create directories in the `Amazon S3 bucket`

![`smart`](./student-guide/diagram/CreateDictInS3_aa_001_20230718.png)

-------------------------------------------------------------------------------
Assuming our root directory on `S3` is `s3://pe-class/`.

1. For tables that have not been sharded, such as `user.information, user.trace, store.bj, store.tj, store.zu and store.sh`, we can create directories on `S3` in the following way:
Create a first-level directory for `user` and `store`(corresponding to the level of databases). In `user` and `store`, create a second-level directory for each `MySQL` instance (corresponding to the level of `MySQL` instances). For example:
Migrate the data in database `user` and `store` of `MySQL instance1` to `s3://pe-class/user/instance1/` and `s3://pe-class/store/instance1/`
Migrate the data in database `user` and `store` of `MySQL instance2` to `s3://pe-class/user/instance2/` and `s3://pe-class/store/instance2/`

2. If there are shards across multiple instances, you can create one first-level directory for each database and create one second-level directory for each sharded table. Then create a third-level directory for each `MySQL` instance for easy management. For example, if you want to migrate and merge tables salesdb.sales from `MySQL instance1` and `MySQL instance2` into the table salesdb.sales in `TiDB Cloud`, you can create the following directories:
`s3://pe-class/salesdb/sales/instance01/`
`s3://pe-class/salesdb/sales/instance01/`
