Schema Migration¶
After resolving errors in your schemas, you can use the schemas with a client application such as pgAdmin, ToadEdge, or the PSQL client, or migrate the schema to an EDB Postgres Advanced Server.
Note!! Note
For more information about using Toad Edge with EDB Postgres Advanced Server, see Toad Edge for Postgres.
You can choose one of the following options for migrating schemas; migrate to an:
Existing on-premises EDB Postgres Advanced Server
New on-premises EDB Postgres Advanced Server
EDB Postgres Advanced Server on Cloud
Schema migration home page¶
Figure 3-14: Schema migration home page
Migrating to an Existing On-Premises EDB Postgres Advanced Server Host¶
You can migrate schemas to an existing on-premises EDB Postgres Advanced Server on Windows or Linux platforms.
Migrating Schemas on Windows¶
Select the
Existing on-premises EDB Postgres Postgres Advanced Serveroption:
Existing on-premises EDB Postgres Advanced Server home page¶
Figure 3-15: Existing on-premises EDB Postgres Advanced Server home page
Select one or more schemas to migrate to EDB Postgres Advanced Server:
Selecting schemas for migration¶
Figure 3-16: Selecting schemas for migration
Note!! Note If your schemas are not 100% compatible, a banner will be displayed as shown; complete the
Contact Usform for any assistance required.
The Contact Us form¶
Figure 3-17: The Contact Us form
Download the assessed schemas:
Download the assessed schemas¶
Figure 3-18: Download the assessed schemas
Click on
Windows:
Selecting Windows operating system¶
Figure 3-19: Selecting Windows operating system
To import the schemas, run the following command:
On CLI
\i c:\users\...\<project_name>.sql
On cmd/shell
edb-psql -f <project_name>.sql
Note!! Note You can also use
pgAdmininstead.
The converted schemas are migrated to the target server.
A successful migration¶
Figure 3-20: A successful migration
Migrating Schemas on Linux¶
To migrate schemas to an existing on-premises EDB Postgres Advanced Server on Linux, complete the following steps:
Click the
Existing on-premises EDB Postgres Advanced Serveroption:
Existing on-premises EDB Postgres Advanced Server home page¶
Figure 3-21: Existing on-Premises EDB Postgres Advanced Server home page
Select one or more schemas to migrate to EDB Postgres Advanced Server:
Selecting schemas for migration¶
Figure 3-22: Selecting schemas for migration
Download the assessed schemas:
Download the assessed schemas¶
Figure 3-23: Download the assessed schemas
Click on
Linux:
Selecting Linux operating system¶
Figure 3-24: Selecting Linux operating system
To import the schemas, invoke the following
edb-psqlclient commands:
sudo su - enterprisedb
edb-psql edb
create database <database_name>;
\\connect <database_name>
\\i <project_name>.sql
Note!! Note You can optionally use the
pgAdminclient for the import.
The converted schemas are migrated to the target server.
A successful schema migration¶
Figure 3-25: A successful schema migration
Migrating to a New On-Premises EDB Postgres Advanced Server Installation¶
You can install new EDB Postgres Advanced Server on-premises on Windows or Linux platforms and migrate the schemas.
Migrating Schemas on Windows¶
To migrate schemas to a new on-premises EDB Postgres Advanced Server on Windows, complete the following steps:
Click
New on-premises EDB Postgres Postgres Advanced Serveroption.
New on-premises EDB Postgres Advanced Server home page¶
Figure 3-26: New on-premises EDB Postgres Advanced Server home page
Select one or more schemas to migrate on EDB Postgres Advanced Server.
Selecting schemas for migration¶
Figure 3-27: Selecting schemas for migration
Select the
Windowsoperating system.
Selecting Windows operating system¶
Figure 3-28: Selecting Windows operating system
Download
Windows Installer.
Downloading Windows installer¶
Figure 3-29: Downloading Windows installer
For installation steps, click
EDB Postgres Advanced Server Installation Guide for Windows.
View Windows installation guide¶
Figure 3-30: A successful schema migration
Download the assessed schemas.
Downloading the assessed file¶
Figure 3-31: Downloading the assessed file
You can import schemas by running the following command:
On CLI
\i c:\users\...\<project_name>.sql
- On cmd/shell
edb-psql -f <project_name>.sql
Importing schemas into EDB Postgres Advanced Server¶
Figure 3-32: Importing schemas into EDB Postgres Advanced Server
Note!! Note You can also use
pgAdmininstead.
The schemas are migrated to the target server.
Figure 3-33: Importing schemas into EDB Postgres Advanced Server
Migrating Schemas on Linux¶
To migrate schemas to an on-premises EDB Postgres Advanced Server on Linux, complete the following steps:
Click
New On-premises EDB Postgres Advanced Serveroption.
Migrating schemas home page¶
Figure 3-34: Migrating schemas home page
Select one or more schemas to migrate on EDB Postgres Advanced Server.
Selecting schemas for migration¶
Figure 3-35: Selecting schemas for migration
Select the
Linuxoperating system.
Selecting Linux operating system¶
Figure 3-36: Selecting Linux operating system
You can select one of the following options to install the EDB Postgres Advanced Server:
Repository
More options
Selecting Linux repository¶
Figure 3-37: Selecting Linux repository
For information on the installation procedure, click
EDB Postgres Advanced Server Installation Guidefor Linux:
Selecting Linux installation guide¶
Figure 3-38: Selecting Linux installation guide
Download the assessed schemas:
Downloading the assessed schemas¶
Figure 3-39: Downloading the assessed schemas
To import the schemas, run the following command:
sudo su - enterprisedb
edb-psql edb
create database <database_name>;
\connect <database_name>
\i <project_name>.sql
Importing schemas into EDB Postgres Advanced Server¶
Figure 3-40: Importing schemas into EDB Postgres Advanced Server
Note!! Note You can also use pgAdmin instead.
The converted schemas are migrated to the target server.
A successful schema migration¶
Figure 3-41: A successful schema migration
Migrating to the Cloud¶
To migrate schemas on EDB Postgres Advanced Server to Cloud, complete the following steps:
Click
EDB Postgres Advanced Server on Cloudoption:
EDB Postgres Advanced Server on Cloud¶
Figure 3-42: EDB Postgres Advanced Server on Cloud
Select one or more schemas to migrate to EDB Postgres Advanced Server:
Selecting schemas for migration¶
Selecting schemas for migration
Select the cloud platform. For example,
IBM Cloud:
Selecting cloud option for migration¶
Figure 3-43: Selecting cloud option for migration
To launch a new cluster, click
Go to Cloud:
Launching a cloud cluster¶
Figure 3-44: Launching a cloud cluster
Or, if you have an existing cluster running, click Next.
Enter the required connection details on the
Connectpage:
Connecting to the cloud cluster¶
Figure 3-45: Connecting to the cloud cluster
Note!! Note You can click
Edit Connectionto make changes to the connection details and retest the connection details.
Click
Test Connectionto verify the connection details:
Verify the connection details¶
Figure 3-46: Verify the connection details
Once the connection is successful, click
Next:
A successful migration¶
Figure 3-47: A successful migration
The converted schemas are migrated to the target server.