Copying Databases through the Command Line

You can automate database copying using the command line.

Note

The command-line interface is available only in certain editions of dbForge Studio. For detailed information on the features availability in the dbForge Studio editions, please refer to the Editions topic.

  1. Click Start, type cmd in the Search programs and files text box, and press ENTER. The Command Prompt opens.

  2. Specify the operation you want to perform and the required parameters and arguments (actions you want to run) in the Command Prompt, for example as follows:

     dbforgemysql.com /copydatabase [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]
    
  3. Press ENTER to run the process.

Select corresponding command line switches to perform the required operations:

Argument Action and Usage
/data This switch is used to copy data along with schema.
/recreate This switch is used to recreate a target database if it exists on Target.
/source This switch is used to set the source with the following options:

* Connect to a live database according to the specified parameters:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

* Specify a full connection string with additional parameters:

connection:<connection_string>
/sourcedatabase This switch is used to define a database to copy. Overrides the database stated in the source option.
/target This switch is used to specify Target with the following options:

* Connect to a live database according to the specified parameters:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

* Specify a full connection string with additional parameters:

connection:<connection_string>
/targetdatabase This switch is used to detemine a target database.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for MySQL?