Use the dbmigrate command of the cell management tool to migrate an existing vCloud Director database from Oracle or Microsoft SQL Server to PostgreSQL.

If you want to use the --private-key-path option, all cells must be configured to permit ssh connections from the superuser without a password. You can use a Linux command line like the one shown here to verify this. This example sets your identity to vcloud, then makes an ssh connection to the cell at cell-ip as root but does not supply the root password.

sudo -u vcloud ssh -i private-key-path root@cell-ip

If the private key in private-key-path on the local cell is readable by user vcloud.vcloud and the corresponding public key has been added to the authorized-keys file for the root user at cell-ip the command succeeds.

Note:

The vcloud user, vcloud group, and vcloud.vcloud account are created by the vCloud Director installer for use as an identity with which vCloud Director processes run. The vcloud user has no password.

Table 1. Cell Management Tool Options and Arguments, dbmigrate Subcommand

Option

Argument

Description

--help (-h)

None

Provides a summary of available commands in this category.

--database-host (-dbhost)

IP address or fully-qualified domain name.

IP address or fully-qualified domain name of the target PostgreSQL database host.

--database-name (-dbname)

The name of the PostgreSQL database.

The name you chose when you created the target PostgreSQL database. Typically vcloud.

--database-password (-dbpassword)

Password for the PostgreSQL database user.

Database user password for the target PostgreSQL database.

--database-port (-dbport)

Port number used by the PostgreSQL database service on the database host.

Port number used by the PostgreSQL database service on the database host.

--database-enable-ssl (-dbssl)

true or false

This option allows you to configure the target PostgreSQL database to require an SSL connection from vCloud Director.

--database-user (-dbuser)

Name of the PostgreSQL database user.

Database user name for the target PostgreSQL database.

--private-key-path

Absolute path of private key that has had its public key added to the authorized_keys of other cells in the server group.

When you use this option, all cells in the server group are reconfigured to use the target PostgreSQL database as the vCloud Director after migration completes.

--verbose

None

Sends all log output to the console as well as to the log files. Includes information that reports migration status for each table and the progress of the entire operation.

Migrate the vCloud Director Database to PostgreSQL and Update Database Connection Properties for All Cells

A command like this one migrates the current vCloud Director database to a target PostgreSQL database installed on host psql.example.com. After the migration completes successfully, all cells in the server group are reconfigured to connect to the target database.

[root@cell1 /opt/vmware/vcloud-director/bin]#cell-management-tool dbmigrate \
-dbhost psql.example.com -dbport 5432 -dbuser vcd-dba -dbname vcloud -dbpassword P@55w0rd \
--private-key-path /vcloud/.ssh/id_rsa
configuring the target database...