Pgloader on Mac

Published on 2017-05-30 by Andrew Graham-Yooll

Getting Started

The other day, we at Solaris Offgrid needed to port our database over to PostgreSQL. It was time.

For that task we used the handy tool that Dimitri Fontaine built.

I thought the instructions on installing the tool on a Mac could have been a bit clearer. So I wrote it up.

  1. In your terminal, clone the project onto your machine {% highlight bash %}git clone https://github.com/dimitri/pgloader.git{% endhighlight %}
  2. {% highlight bash %}brew install sbcl brew install clozure-cl brew install freetds --universal --build-from-source{% endhighlight %}
  3. {% highlight bash %}cd pgloader{% endhighlight %}
  4. You probably wont have to run {% highlight bash %}make{% endhighlight %} as the last command should have run that for you. That did it for me!
  5. {% highlight bash %}./build/bin/pgloader --version{% endhighlight %} Now it is installed.
  6. Create an alias for pgloader {% highlight bash %}nano ~/.bash-profile alias pgloader="copied path_to_here/build/bin/pgloader"{% endhighlight %}. Then cntrl + o, enter, cntrl + x
  7. Test again:{% highlight bash %}pgloader --version pgloader --help{% endhighlight %}

Voila!

Hope it helps! If it doesn't work, let me know and Ill help out as much as possible.