# How to transfer runs/datasets between different regional servers using BaseSpace CLI

The BaseSpace interface (GUI) **cannot** be used to transfer runs/datasets between BaseSpace accounts on different regional instances. The only way to do so is by downloading the runs/datasets from one account and then uploading them to the other directly. Config files can be used in BaseSpace Command Line Interface (CLI) to do this.

Config files are created at the time of authentication. 'bs list config' lists all available config files. Each config file has two lines: 1) API server it is associated with, and 2) Access Token.

Steps to transfer runs/datasets from country 1 to country 2:

1. **Authenticate separately for country 1 and country 2**: The '`--api-server`' flag needs to be specified if a non-USE1 account is being authenticated and the '`-c`' flag can be used to specify a name for the config file. For example, 'bs auth -c ca --api-server <https://cac1.sh.basespace.illumina.com>' can be used to authenticate a Canadian BaseSpace account and store the access credentials in the config file called 'ca'. For example, if c1 and c2 are the config files created for country 1 and country 2, respectively, specify the appropriate scopes while authenticating (eg, 'CREATE RUNS' scope if runs are to be transferred). The following are the API server URLs for different regional instances.

| Region Name    | Country   | City/State         | API URL                                         |
| -------------- | --------- | ------------------ | ----------------------------------------------- |
| USE1 (default) | USA       | Virginia, USA      | `https://api.basespace.illumina.com`            |
| CAC1           | Canada    | Montréal, Québec   | `https://api.cac1.sh.basespace.illumina.com`    |
| EUC1           | Europe    | Frankfurt, Germany | `https://api.euc1.sh.basespace.illumina.com`    |
| EUW2           | UK        | London, UK         | `https://api.euw2.sh.basespace.illumina.com`    |
| CNN1           | China     | Beijing, China     | `https://api.cnn1.sh.basespace.illumina.com.cn` |
| APS2           | Australia | Sydney, Australia  | `https://api.aps2.sh.basespace.illumina.com`    |

2. **Download runs/datasets from country 1**: Use the '`-c`' flag to specify the appropriate config file while downloading. For example: 'bs -c c1 download project -i --extension=fastq.gz -o /output/path' to download FastQ files from a project in country 1.
3. **Upload runs/datasets from country 2**: Use the '`-c`' flag again. For example: 'bs -c c2 upload dataset -p --recursive /output/path' to upload FastQ files to a project in country 2.

More information about Config files can be found on the [CLI Overview](https://developer.basespace.illumina.com/docs/content/documentation/cli/cli-overview#SpecifyAPIserverandAccessToken) help page.

\
\
\ <br>

|                                                                                                                                                                                                                                                                                                                                                                 |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| *For any feedback or questions regarding this article (Illumina Knowledge Article #5682), contact Illumina Technical Support* [*techsupport@illumina.com*](mailto:techsupport@illumina.com?subject=Question%2FFeedback%20Regarding%20Illumina%20Knowledge%20Article%20#000005682%20-%20Software%20\&body=Dear%20Illumina%20Technical%20Support,%0D%0A%0D%0A)*.* |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledge.illumina.com/software/cloud-software/software-cloud-software-faq-list/000005682.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
