On this page
Generates a sequence of SQL statements that can be executed to reproduce the objects defined in the cluster.
It creates a backup of only the metadata without the data.
--databases flag is used,
pipelines will only be dumped for the specified databases.
sdb-admin dump --exclude users,roles, groups --output-path dump.sql
sdb-admin dump --only databases,tables,procedures --databases db1,db2
dump command produces a sequence of DDL statements, which can be used to reproduce the objects defined in the original SingleStore database or the cluster.
You can run the
dump command cluster-wide to dump a variety of object types, such as Users, Groups, Roles, and Resource Pools.
dump command only creates a backup of the DDL statements in the database.
The privileges required to create and reload a dump file follow the same pattern of permissions and scope used to read and manipulate each object type individually.
You need the
SHOW METADATA permission to export all object types.
SHOW command for each object type will be sufficient for the export action as well.
dump command can be invoked at the command line from inside the directory where Toolbox is installed.
This command can be used with the flags specified in the Usage section.
sdb-admin dump --help.
Using the flags supported by the
sdb-admin dump command, you can dump DDL for objects in one or more databases or an entire cluster.
Resource Pools, all
All Resource Pools, Users, Groups, and Roles are dumped.
All the users are dumped.
To dump an entire cluster, use no flags.
This will export all object types supported, and the output will be written to the default file path or the one specified in the
However, system databases and views such as
memsqlwill not be dumped.
To dump select databases, specify the required databases via the
You can further filter this output by specifying the necessary object types in the
Alternatively, you can ignore certain object types in the output using the
--excludeflags allow you to export specific object types on the cluster as well as the database level.
Note that these flags cannot be used together.
You can reload the dump file into a SingleStore cluster by using a SQL client, such as the MySQL client or the SingleStore Client.
Usage:sdb-admin dump [flags]For flags that can accept multiple values (indicated by VALUES after the name of the flag),separate each value with a comma.Flags:--databases VALUES Only run for specified databases--exclude VALUES Exclude the specified objects-h, --help Help for dump--only VALUES Only dump specified objects--output-path ABSOLUTE_PATH Write the dump file to this pathGlobal Flags:--backup-cache FILE_PATH File path for the backup cache--cache-file FILE_PATH File path for the Toolbox node cache-c, --config FILE_PATH File path for the Toolbox configuration--disable-colors Disable color output in console, which some terminal sessions/environments may have difficulty with--disable-spinner Disable the progress spinner, which some terminal sessions/environments may have issues with-j, --json Enable JSON output--parallelism POSITIVE_INTEGER Maximum number of operations to run in parallel--runtime-dir DIRECTORY_PATH Where to store Toolbox runtime data--ssh-control-persist SECONDS Enable SSH ControlPersist and set it to the specified duration in seconds--ssh-max-sessions POSITIVE_INTEGER Maximum number of SSH sessions to open per host, must be at least 3--ssh-strict-host-key-checking Enable strict host key checking for SSH connections--ssh-user-known-hosts-file FILE_PATH Path to the user known_hosts file for SSH connections. If not set, /dev/null will be used--state-file FILE_PATH Toolbox state file path-v, --verbosity count Increase logging verbosity: valid values are 1, 2, 3. Usage -v=count or --verbosity=count-y, --yes Enable non-interactive mode and assume the user would like to move forward with the proposed actions by default
This command is interactive unless you use either
--json flag to override interactive behavior.
Last modified: October 3, 2023