Using Command-Line Interface to Switch Between Database Servers

You can migrate Parallels Plesk Panel internal database to a new database server and configure Parallels Plesk Panel to access the database at the database server.

The command for switching the Parallels Plesk Panel database servers has the following syntax:

reconfigurator --switch-plesk-database --new-provider=<provider name> --host=<host name> --db=<database name> --login=<database user login> --password=<database user password> [--password=<port number>] [--admin-login=<administrator login>] [--admin-password=<administrator password>]

See the following table for the command options descriptions.

Options

Option

Parameter

Description

Comment

--new-provider

Jet | MSSQL | MySQL

The new database server type

 

--db

<database name>

name of the Parallels Plesk Panel database on the new database server

For Jet databases, you need to specify full path to a new database to be created. To ensure that proper user permissions are assigned to the database file, create the file in the the %plesk_dir%\admin\db directory, where %plesk_dir% is the Parallels Plesk Panel installation directory.

For example,

"--db=c:\Program Files\Parallels\Plesk\admin\db\psa_new.mdb"

For MySQL and MSSQL databases, you need to specify only the database name on the server. For example:

"--db=psa_new"

--host

<host name>

database server IP address or host name

Jet databases are always local.

--login

<user login name>

Parallels Plesk Panel database user name used by Parallels Plesk Panel

 

--password

<user password>

Parallels Plesk Panel database user name used by Parallels Plesk Panel

 

--port

<port number>

New database server port number. This parameter is optional.

define port number if the new database server uses a non-default port number

--admin-login

<administrator login name>

Database server administrator login name. This parameter is optional.

Define the server administrator credentials if you want a new database user created with the user login name and password specified by the --login and --password options. If the options are omitted from the command, Parallels Plesk Panel will be configured to use the database user credentials specified by the --login and --password options, no new user will be created for the database.

--admin-password

<administrator password>

Database server administrator password. This parameter is optional.

To switch between database servers through command-line interface, follow these steps:

  1. Log in Parallels Plesk Panel server as a user with administrator rights by using Remote Desktop.
  2. Start cmd.exe.
  3. Change directory to the %plesk_dir%\admin\bin\ folder (where %plesk_dir% is the system variable defining the folder where Parallels Plesk Panel is installed).
  4. Execute the server switch command.

    For example, to migrate the Parallels Plesk Panel internal database to a new location accessible at c:\Program Files\Parallels\Plesk\admin\db\psa3.mdb, make it accessible through the Jet database engine installed on the Parallels Plesk Panel server (local host), and instruct Parallels Plesk Panel to use an existing user credentials (login name dbadmin and password dbadminpass) to access the database, use the following command:

    reconfigurator --switch-plesk-database --new-provider=Jet --host=localhost "--db=c:\Program Files\Parallels\Plesk\admin\db\psa3.mdb" --login=dbadmin --password=dbadminpass

Warning! By changing the database user password, you also change Parallels Plesk Panel administrator's password for accessing Parallels Plesk Panel. Parallels Plesk Panel administrator's password and Parallels Plesk Panel database user password are always the same (although user login names can be different).