# Moving Data Between Databases

There are ways to move your data between databases depending on whether SingleStore Helios or SingleStore Self-Managed is where the data is being accessed.&#x20;

* [SELECT ... INTO OUTFILE ](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-manipulation-language-dml/select/#select-into-outfile.md) , then [LOAD DATA INFILE](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-manipulation-language-dml/load-data.md).
  ```sql
  SELECT * FROM table_name_1 INTO OUTFILE '/home/username/file_name.csv'
          FIELDS TERMINATED BY ','
          LINES TERMINATED BY '\n';

  LOAD DATA INFILE '/home/username/file_name.csv'
          INTO TABLE table_name_2;

  ```
* [mysqldump](https://docs.singlestore.com/db/v9.1/developer-resources/migrate-existing-applications/transition-from-mysql-to-singlestore/#section-id23514988725351.md) with or without filters.
  ```shell
  mysqldump -uroot -p db_name table_name [--where='id<1000000']
  ```
* [SELECT ... INTO](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-manipulation-language-dml/select/#select-into-variable.md) , [CREATE PIPELINE AS LOAD DATA](https://docs.singlestore.com/db/v9.1/reference/sql-reference/pipelines-commands/create-pipeline.md), then [START PIPELINE](https://docs.singlestore.com/db/v9.1/reference/sql-reference/pipelines-commands/start-pipeline.md). The following example uses S3, but this will work for HDFS, GCS, KAFKS, FS,  and AZURE as well.
  ```sql
  SELECT * FROM table_name_1
  INTO S3 bucket/target 
  CONFIG configuration_json 
  CREDENTIALS credentials_json 

  CREATE PIPELINE pipeline_name AS LOAD DATA S3 'bucket-name' | '<bucket-name/path>' 
        [CONFIG '<configuration_json>']
        CREDENTIALS '<credentials_json>'
  INTO TABLE table_name_2;         

  START PIPELINE pipeline_name;
  ```

***

Modified at: September 10, 2025

Source: [/db/v9.1/manage-data/moving-data/moving-data-between-databases/](https://docs.singlestore.com/db/v9.1/manage-data/moving-data/moving-data-between-databases/)

(An index of the documentation is available at /llms.txt)
