2.2 Performing an Offline Migration

Table of Contents Previous Next


2 Using Migration Toolkit : 2.2 Performing an Offline Migration

If you inspect the file contents, you will find that the files contain the SQL commands required to recreate the migrated objects on the EDB Ark cluster. The mtk_hr_ddl.sql file contains all of the ddl commands required to recreate all of the database objects, while the mtk_hr_data.sql file contains the commands that restore the data into the database.
You can the scp command to copy the files; before using scp, you must download the SSH key for the cluster, and modify the permissions associated with the key.
To download your private key, navigate to the Clusters tab of the EDB Ark console, and click the Download SSH Key icon located to the left of the window.
As the key downloads, the Accessing Your Cluster Instance popup opens. The popup displays information that will help you connect to your cluster, including the key name, the key file permissions required, and the user name and IP address you can use when connecting.
Before using your ssh key, open a terminal window, navigate to the location of the ssh key file, and modify the key permissions with the command:
ssh_key specifies the complete path and name of the EDB Ark ssh private key file.
After setting the permissions for the key file, you can use the key and scp to copy files to the cloud. The syntax of the scp command is:
scp -i ssh_key file_name user@host_name:
ssh_key specifies the complete path and name of the cluster's ssh key file.
file_name specifies the name of the file you are copying to the Cloud. By default, each database object definition is saved in a separate file with a name derived from the schema name and object type in your home folder; use an * to copy all of the files in the directory with a single command.
user specifies the name of the connecting user. Use the name displayed on the Accessing Your Cluster Instance popup.
host_name specifies the IP address of the master node of the EDB Ark cluster; the host name is located in the DNSNAME column, on the Details panel of the Clusters tab in the EDB Ark console.
The colon (:) at the end of this command specifies that the file will be copied to the root directory on the cluster's primary node; please note that you can specify a file destination by adding a destination path after the colon.
Use ssh to connect to the master node of your EDB Ark cluster, specifying the location of the ssh key (on your workstation) in the command:
ssh -i /path/ssh_key user@host_name
path specifies the location of your EDB Ark ssh certificate on the system from which you are connecting.
ssh_key specifies the path and name of the EDB Ark ssh private key file.
user specifies the name of the connecting user.
host_name specifies the host name of the node to which you wish to connect.
Then, use the psql client to connect to the server:
db_name specifies the name of the database into which you wish to migrate.
Use the \i meta-command to invoke the migration script that creates the object you wish to migrate. For example, to create all of the database objects in the example schema, first invoke the mtk_hr_ddl.sql script:

2 Using Migration Toolkit : 2.2 Performing an Offline Migration

Table of Contents Previous Next