Outdated Version

You are viewing an older version of this section. View current production version.

Exporting Data min read


If you are running SingleStore Managed Service, use the admin endpoint to run the commands discussed in this topic.

This topic describes how to export data from SingleStore DB databases using mysqldump, which you can use because SingleStore DB supports the same query-level inputs and outputs as MySQL. mysqldump creates a .sql file containing the queries necessary to recreate a database. You can run the output of mysqldump against an instance of SingleStore DB or MySQL, so you can use this strategy to move data between the two.

Find the mysqldump reference page here.

Backing up a Single Database

$ mysqldump -h -u root -P 3306 foo > foo.sql

If you have a database named “foo”, you can create a backup with the following command:

Backing up All Databases

If you want to back up every database in an instance of SingleStore DB, use the following command:

$ mysqldump -h -u root -P 3306 --all-databases > full_backup.sql