You can retrieve the on-premises database and configuration resources that you need
for the migration to your cloud environment.
In the commands below, the
following variables are used.
- CELL_USERNAME
represents the OS root user name for a VMware Cloud
Director cell.
- CELL_PASSWORD
represents the OS root user password for a VMware Cloud
Director cell.
- DBHOST_USERNAME
represents the user name for the database host.
- DBHOST_PASSWORD
represents the database password.
- CELL_HOST_NAME
represents the FQDN of a VMware Cloud
Director cell.
- DBHOST_NAME
represents the FQDN of the database host.
Prerequisites
- Obtain the on-premises
VMware Cloud
Director
cell name, cell OS root user name and password. If
you are using an appliance installation, obtain the cell name and
credentials for the primary cell.
- Obtain the host name, user name
and password for the VMware Cloud
Director database. If you are using an appliance
installation, obtain the credentials for the primary cell.
Procedure
-
Copy the
responses.properties file.
sshpass -p CELL_PASSWORD scp -o StrictHostKeyChecking=no CELL_USERNAME@$CELL_HOST_NAME:/opt/vmware/vcloud-director/etc/responses.properties responses.properties
-
Depending on your on-premises
environment, choose one of the following.
- If you are using an
appliance deployment with an embedded database, log in directly or by using
an SSH client to the primary VMware Cloud
Director appliance console.
- If you are using a
Linux installation with an external PostgreSQL database, log in to the
database server.
-
To create the database dump
file, choose one of the following options depending on your environment.
- If you are using an
appliance deployment with an embedded database, run the following
command.
sshpass -p DBHOST_PASSWORD ssh -o StrictHostKeyChecking=no DBHOST_USERNAME@DBHOST_NAME "su - postgres -c \"pg_dump -a -Fc DB_NAME -f /tmp/vcloud_db_data.dump"
- If you are using a
Linux installation with an external PostgreSQL database, run the following
command.
sshpass -p DBHOST_PASSWORD ssh -o StrictHostKeyChecking=no DBHOST_USERNAME@DBHOST_NAME "pg_dump -a -h DBHOST_NAME -d DB_NAME -U postgres -Fc -f /tmp/vcloud_db_data.dump"
-
Copy the database dump file.
sshpass -p DBHOST_PASSWORD scp -o StrictHostKeyChecking=no DBHOST_USERNAME@DBHOST_NAME:/tmp/vcloud_db_data.dump vcloud_db_data.dump
-
Run the command to create a
resources.zip file that includes the
responses.properties file and the data dump file.
zip resources.zip vcloud_db_data.dump responses.properties
-
Run the command to calculate the
MD5 checksum of the resources.zip file and make a note of
it.
What to do next
Upload the resources.zip file to your cloud environment.