Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

pgloader_wrapper

Wrapper or driver script to automate the pgloader ETL utility for instant or iterative database migrations.

Introduction

pgloader_wrapper is a set of script files for a database engineer or DBA to migrate a MySQL database to Postgresql quickly and frequently using pgloader.

  1. pgloader_wrapper.sh
  2. grants.sql
  3. pgloader.load

Getting Started

  1. install pgloader
  2. configure the settings in pgloader_wrapper.sh as documented near the top of file
  3. grants.sql has typical Postgresql grants for a web app. Customize as necessary.
  4. pgloader.load illustrates advanced settings for migrating a MySQL database to Postgresql 9.2+. Customize as necessary.
  5. run: ./pgloader_wrapper.sh
  6. look at the logfile in pgloader_wrapper.sh.log

FAQ

I'm familiar with MySQL but not Postgresql. What do I need to know?

  • In MySQL, database and schema are the same thing (a directory on disk.) In Postgresql, a database is a logical container for multiple objects like schemas and roles.
  • In Postgresql, a user is the same thing as a role (aside from inheritance differences.)
  • In MySQL, a unique index is a unique constraint. In Postgresql, a unique constraint's underlying mechanism is a unique index, but the two are considered logically different. UPSERTs require constraints.

Todo

  • parameterize database name in pgloader.load like grants.sql

About

Wrapper or driver script to automate pgloader for quick and/or iterative database migrations

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.