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: 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-premise EDB Postgres Advanced Server

  • New on-premise EDB Postgres Advanced Server

  • EDB Postgres Advanced Server on Cloud

schema migration home page

Schema migration home page

Migrating to an Existing On-Premise EDB Postgres Advanced Server Host

You can migrate schemas to an existing on-premise EDB Postgres Advanced Server on Windows or Linux platforms.

Migrating Schemas on Windows

  1. Select the Existing on-premise EDB Postgres Postgres Advanced Server option:

existing epas on-prem home page

Existing on-premise EDB Postgres Advanced Server home page

  1. Select one or more schemas to migrate to EDB Postgres Advanced Server:

existing epas on-prem select schemas

Selecting schemas for migration

Note

If your schemas are not 100% compatible, a banner will be displayed as shown; complete the Contact Us form for any assistance required.

existing epas contact us form

The Contact Us form

  1. Download the assessed schemas:

existing epas download assessed schemas

Download the assessed schemas

  1. Click on Windows:

existing epas windows selection

Selecting Windows operating system

  1. 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

You can also use pgAdmin instead.

The converted schemas are migrated to the target server.

existing epas schema migrated successfully

A successful migration

Migrating Schemas on Linux

To migrate schemas to an existing on-premise EDB Postgres Advanced Server on Linux, complete the following steps:

  1. Click the Existing on-premise EDB Postgres Advanced Server option:

existing epas home page_linux

Existing on-premise EDB Postgres Advanced Server home page

  1. Select one or more schemas to migrate to EDB Postgres Advanced Server:

existing epas schema selection

Selecting schemas for migration

  1. Download the assessed schemas:

existing epas downloading assessed schemas

Download the assessed schemas

  1. Click on Linux:

existing epas selecting linux

Selecting Linux operating system

  1. To import the schemas, invoke the following edb-psql client commands:

    sudo su - enterprisedb
    edb-psql edb
    create database <database_name>;
    \\connect <database_name>
    \\i <project_name>.sql
    

Note

You can optionally use the pgAdmin client for the import.

The converted schemas are migrated to the target server.

existing epas successful schema migration

A successful schema migration

Migrating to a New On-Premise EDB Postgres Advanced Server Installation

You can install new EDB Postgres Advanced Server on-premise on Windows or Linux platforms and migrate the schemas.

Migrating Schemas on Windows

To migrate schemas to a new on-premise EDB Postgres Advanced Server on Windows, complete the following steps:

  1. Click New on-premise EDB Postgres Postgres Advanced Server option.

new epas home page

New on-premise EDB Postgres Advanced Server home page

  1. Select one or more schemas to migrate on EDB Postgres Advanced Server.

new epas select schemas

Selecting schemas for migration

  1. Select the Windows operating system.

new epas installtion on Windows

Selecting Windows operating system

  1. Download Windows Installer.

new epas windows installer

Downloading Windows installer

  1. For installation steps, click EDB Postgres™ Advanced Server Installation Guide for Windows.

new epas windows installation guide

View Windows installation guide

  1. Download the assessed schemas.

new epas download assessed schemas

Downloading the assessed file

  1. 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
    
new epas importing schemas on windows

Importing schemas into EDB Postgres Advanced Server

Note

You can also use pgAdmin instead.

The schemas are migrated to the target server.

new epas mig success

Migrating Schemas on Linux

To migrate schemas to an on-premise EDB Postgres Advanced Server on Linux, complete the following steps:

  1. Click New On-premise EDB Postgres Advanced Server option.

migration portal home page

Migrating schemas home page

  1. Select one or more schemas to migrate on EDB Postgres Advanced Server.

migration portal home page

Selecting schemas for migration

  1. Select the Linux operating system.

migration portal home page

Selecting Linux operating system

  1. You can select one of the following options to install the EDB Postgres Advanced Server:

    • Repository

    • More options

    new epas schema selection

    Selecting Linux repository

  2. For information on the installation procedure, click EDB Postgres™ Advanced Server Installation Guide for Linux:

migration portal home page

Selecting Linux installation guide

  1. Download the assessed schemas:

migration portal home page

Downloading the assessed schemas

  1. 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 on epas

Importing schemas into EDB Postgres Advanced Server

Note

You can also use pgAdmin instead.

The converted schemas are migrated to the target server.

migration portal home page

A successful schema migration

Migrating to the Cloud

To migrate schemas on EDB Postgres Advanced Server to Cloud, complete the following steps:

  1. Click EDB Postgres Advanced Server on Cloud option:

cloud home page

EDB Postgres Advanced Server on Cloud

  1. Select one or more schemas to migrate to EDB Postgres Advanced Server:

epas cloud schema selection

Selecting schemas for migration

  1. Select the cloud platform. For example, IBM Cloud:

cloud epas selecting cloud option

Selecting cloud option for migration

  1. To launch a new cluster, click Go to Cloud:

epas cloud cluster

Launching a cloud cluster

Or, if you have an existing cluster running, click Next.

  1. Enter the required connection details on the Connect page:

epas cloud connection

Connecting to the cloud cluster

Note

You can click Edit Connection to make changes to the connection details and retest the connection details.

  1. Click Test Connection to verify the connection details:

verifying cloud connection details

Verify the connection details

  1. Once the connection is successful, click Next:

cloud epas successful migration

A successful migration

The converted schemas are migrated to the target server.