You can migrate an existing vCloud Director database from Oracle or Microsoft SQL Server to PostgreSQL by using the dbmigrate subcommand of the cell management tool.
In vCloud Director 9.5, Oracle databases are unsupported. If you are upgrading a vCloud Director installation that uses an Oracle database, you must migrate the existing Oracle database to PostgreSQL before upgrading the database.
cell-management-tool dbmigrate options
Hot migration is not supported. Before you begin a database migration, you must stop vCloud Director services. Open a console, shell, or terminal window on the cell platform and run the Linux command service vmware-vcd stop. For information about starting and stopping vCloud Director services, see vCloud Director Installation and Upgrade Guide.
|None||Provides a summary of available commands in this category.|
|IP address or fully qualified domain name.||IP address or fully qualified domain name of the target PostgreSQL database host.|
|The name of the PostgreSQL database.||The name you chose when you created the target PostgreSQL database. Typically
|Password for the PostgreSQL database user.||Database user password for the target PostgreSQL database.|
|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-ssl||true or false||Configures the target PostgreSQL database to require an SSL connection from vCloud Director.|
|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.||Reconfigures all cells in the server group to use the target PostgreSQL database after migration completes.
Important: All cells must permit SSH connections from the superuser without a password.
|--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.|
sudo -u vcloud ssh -i private-key-path root@cell-ipThis 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. If the private key in private-key-path on the local cell is readable by user
vcloud.vcloudand the corresponding public key is present in the authorized-keys file for the root user at cell-ip, the command succeeds.
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.
Migrate the vCloud Director Database to PostgreSQL and Update Database Connection Properties for All Cells
psql.example.com. Because the --private-key-path option is included, after the migration finishes 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...
If not including the --private-key-path option, after the migration finishes, you can connect the cells to the target database by running the reconfigure-database subcommand on each cell in the server group. See Reconfigure a Cell After Migrating the vCloud Director Database to PostgreSQL.