diff --git a/README.md b/README.md index 20bc88f..b79183b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,22 @@ pgloader is available under [The PostgreSQL Licence](http://www.postgresql.org/a ## INSTALL +You can install pgloader directly from +[apt.postgresql.org](https://wiki.postgresql.org/wiki/Apt) and from official +debian repositories, see +[packages.debian.org/pgloader](https://packages.debian.org/search?keywords=pgloader). + + $ apt-get install pgloader + +You can also use a **docker** image for pgloader at +: + + $ docker pull dimitri/pgloader + $ docker run --rm --name pgloader dimitri/pgloader:latest pgloader --version + $ docker run --rm --name pgloader dimitri/pgloader:latest pgloader --help + +## Build from sources + pgloader is now a Common Lisp program, tested using the [SBCL](http://sbcl.org/) (>= 1.1.14) and [Clozure CL](http://ccl.clozure.com/) implementations with @@ -74,63 +90,15 @@ When building from sources, you should always build from the current git HEAD as it's basically the only source that is managed in a way to ensure it builds aginst current set of dependencies versions. - - -## The pgloader.lisp script - -Now you can use the `#!` script or build a self-contained binary executable -file, as shown below. - - ./pgloader.lisp --help - -Each time you run the `pgloader` command line, it will check that all its -dependencies are installed and compiled and if that's not the case fetch -them from the internet and prepare them (thanks to *Quicklisp*). So please -be patient while that happens and make sure we can actually connect and -download the dependencies. - -## Build Self-Contained binary file +## More options when building from source The `Makefile` target `pgloader` knows how to produce a Self Contained -Binary file for pgloader, named `pgloader.exe`: +Binary file for pgloader, found at `./build/bin/pgloader`: $ make pgloader By default, the `Makefile` uses [SBCL](http://sbcl.org/) to compile your -binary image, though it's possible to also build using +binary image, though it's possible to build using [CCL](http://ccl.clozure.com/). $ make CL=ccl pgloader @@ -148,16 +116,36 @@ You can also remove the `--compress-core` option that way: The `--compress-core` is unique to SBCL, so not used when `CC` is different from the `sbcl` value. +You can also tweak the default amount of memory that the `pgloader` image +will allow itself using when running through your data (don't ask for more +than your current RAM tho): + + $ make DYNSIZE=8192 pgloader + The `make pgloader` command when successful outputs a `./build/bin/pgloader` file for you to use. ## Usage -Give as many command files that you need to pgloader: +You can either give a command file to pgloader or run it all from the +command line, see the +[pgloader quick start](http://pgloader.io/howto/quickstart.html) on + for more details. $ ./build/bin/pgloader --help $ ./build/bin/pgloader - + +For example, for a full migration from SQLite: + + $ createdb newdb + $ pgloader ./test/sqlite/sqlite.db postgresql:///newdb + +Or for a full migration from MySQL, including schema definition (tables, +indexes, foreign keys, comments) and parallel loading of the corrected data: + + $ createdb pagila + $ pgloader mysql://user@localhost/sakila postgresql:///pagila + See the documentation file `pgloader.1.md` for details. You can compile that file into a manual page or an HTML page thanks to the `ronn` application: