Coder Social home page Coder Social logo

bonn93 / pgloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dimitri/pgloader

0.0 0.0 3.0 20.16 MB

Migrate to PostgreSQL in a single command!

Home Page: http://pgloader.io

License: Other

Makefile 1.90% Shell 0.78% Common Lisp 96.55% Batchfile 0.08% Dockerfile 0.17% TSQL 0.51%
confluence sql sqlserver postgresql pgloader migration migration-tool docker postgres

pgloader's Introduction

PGLoader-Confluence

This is a fork of pgloader based on the last stable v.3.6.1 release.

This fork has a modified Dockerfile which is pre-baked to for MSSQL to Postgres migrations.

Why a fork?

I needed a repeatable environement, but needed to resolve a few bugs present in master, and other fixed in mixed and matched versions of PGLoader.

This fork includes SSL fixes for several issues and bugs when connecting to SQL Server instances. Key items to note at runtime;

  • Includes a freetds.conf with UTF8 encoding
  • Includes OpenSSL/LibSSL
  • Has a templated sample DSL

Running this image:

This image accepts several environment varaibles when run. These must be set.

Quick Start:

docker run -e MSSQL_USER=sa -e MSSQL_PASS=averysecurepassword -e "MSSQL_SERVER_ADDR=192.168.10.3" -e SOURCE_DB=confluence -e PSQL_USER=confluence -e PSQL_PASS=confluence -e "PSQL_SERVER_ADDR=192.168.10.3" -e DEST_DB=confluence mbern/pgloader-confluence:latest

Envs

  • MSSQL_USER ( same user as confluence application )

  • MSSQL_PASS ( the obvious )

  • MSSQL_SERVER_ADDR ( ip/fqdn/hostname of SQL Server )

  • SOURCE_DB ( the source database )

  • PSQL_USER ( the target user in postgres )

  • PSQL_USER ( .. )

  • PSQL_SERVER_ADDR ( ip/fqdn/hostname of Postgres Server )

  • DEST_DB ( the destination database in postgres )

Customizing the DSL

Modify and create your DSL in the migration_playbook file. Standard Syntax and clauses/statements are documeted at PGLoader.

Running inside a docker network

This is designed to be run within a docker based network such as overlay or Kubernetes. Simply change the MSSQL_SERVER_ADDR and PSQL_SERVER_ADDR to the hostname of the source/targets and run within the same network. Two samples shown below;

Docker Network Quick Start:

docker run -e MSSQL_USER=sa -e MSSQL_PASS=averysecurepassword -e "MSSQL_SERVER_ADDR=192.168.10.3" -e SOURCE_DB=confluence -e PSQL_USER=confluence -e PSQL_PASS=confluence -e "PSQL_SERVER_ADDR=192.168.10.3" -e DEST_DB=confluence --network=atlassian mbern/pgloader-confluence:latest

Kubernetes Network Quick Start:

Create a v1/pod and reference the SVC of postgres or external CloudSQL connections docker run -e MSSQL_USER=sa -e MSSQL_PASS=averysecurepassword -e "MSSQL_SERVER_ADDR=sqlserver.atlassian-dev-ns" -e SOURCE_DB=confluence -e PSQL_USER=confluence -e PSQL_PASS=confluence -e "PSQL_SERVER_ADDR=postgres.atlassian-dev-ns" -e DEST_DB=confluence mbern/pgloader-confluence:latest

Other images to test with:

Pre-baked postgres image with several databased for development: https://hub.docker.com/repository/docker/mbern/postgres-atlas-all Atlassian Confluence: https://hub.docker.com/r/atlassian/confluence-server/

pgloader's People

Contributors

alexbaretta avatar benesch avatar bjoernhaeuser avatar cbandy avatar chanmix51 avatar chmouel avatar chosak avatar df7cb avatar dimitri avatar disco-stu avatar drmoose avatar epipping avatar fpauser avatar ftzdomino avatar gavinwahl avatar gciolli avatar gvangool avatar jamim avatar jasonrig avatar jd avatar jdufresne avatar krzysiekj avatar l-we avatar lynxis avatar mtyson01 avatar rouge8 avatar scymtym avatar sectoid avatar vkryukov avatar zickzackv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.