项目作者: Guy-Incognito

项目描述 :
Dockerfile for ora2pg Oracle to PostgreSQL migration tool
高级语言: Dockerfile
项目地址: git://github.com/Guy-Incognito/ora2pg.git
创建时间: 2018-02-13T18:05:26Z
项目社区:https://github.com/Guy-Incognito/ora2pg

开源协议:

下载


ora2pg Docker

Container image for migrating from oracle to postgresql database.

Tags and Releases

Tags are created for each release.
Tag names relate to their respective ora2pg release.

Introduction

This container can be used to migrate from Oracle to PostgreSQL utilizing the tool ora2pg.

Documentation: https://ora2pg.darold.net/documentation.html

Thanks to Gilles Darold for this awesome tool!!

How to build

  1. docker build . -t ora2pg

How to run

Usage:

The container accepts 2 mounted folders

  • “/config” (read only) —> mount your folder containing the “ora2pg.conf” file here (example configuration: ora2pg.conf
  • “/data” —> mount the folder where all output should be written to here

Run the container with:

  1. docker run \
  2. --name ora2pg \
  3. -it \
  4. -v /path/to/local/config:/config \
  5. -v /path/to/local/data:/data \
  6. georgmoser/ora2pg

If no arguments are passed, the default run will be:

  1. ora2pg --debug -c /config/ora2pg.conf

Custom arguments may be passed to the ora2pg call using:

  1. docker run \
  2. --name ora2pg \
  3. -it \
  4. -v /path/to/local/config:/config \
  5. -v /path/to/local/data:/data \
  6. georgmoser/ora2pg \
  7. ora2pg [[ARG1..ARGN]]

Furthermore the

  • CONFIG_LOCATION: ora2pg config file location (inside the container)
  • OUTPUT_LOCATION: output directory of dump (inside the container)
  • ORA_HOST: Oracle datasource; the same as ORACLE_DSN in ora2pg.conf; if no value provided, ORACLE_DSN will be used.
  • ORA_USER: Oracle user; the same as ORACLE_USER in ora2pg.conf; if no value provided, ORACLE_USER will be used.
  • ORA_PWD: Oracle password; the same as ORACLE_PWD in ora2pg.conf; if no value provided, ORACLE_PWD will be used.

can be passed via environment variables:
```shell script
docker run \
—name ora2pg \
-e CONFIG_LOCATION=/config/myconfigfile.conf \
-e OUTPUT_LOCATION=/data/myfolder \
-e ORA_HOST=dbi:Oracle:host=mydb.mydom.fr;sid=SIDNAME;port=1521 \
-e ORA_USER=system \
-e ORA_PWD=secret \
-it \
-v /path/to/local/config:/config \
-v /path/to/local/data:/data \
georgmoser/ora2pg

  1. or with a docker-compose:
  2. ```yaml
  3. version: '3.3'
  4. services:
  5. ora2pg:
  6. container_name: ora2pg
  7. environment:
  8. - CONFIG_LOCATION: "/config/myconfigfile.conf"
  9. - OUTPUT_LOCATION: "/data/myfolder"
  10. - ORA_HOST: "dbi:Oracle:host=mydb.mydom.fr;sid=SIDNAME;port=1521"
  11. - ORA_USER: "system"
  12. - ORA_PWD: "secret"
  13. volumes:
  14. - '/path/to/local/config:/config'
  15. - '/path/to/local/data:/data'
  16. image: georgmoser/ora2pg

GUI

If you are looking for a graphical interface for ora2pg, take a look at visulate-ora2pg