An open API service indexing awesome lists of open source software.

https://github.com/rongfengliang/pgloader-gitlab-pg2pg

pgloader-gitlab-pg2pg
https://github.com/rongfengliang/pgloader-gitlab-pg2pg

data-migration docker docker-compose pg2pg pgloader

Last synced: 4 months ago
JSON representation

pgloader-gitlab-pg2pg

Awesome Lists containing this project

README

          

# pgloader index test

> this demo project is for gitlab table migration

## export data

```code
pg_dump -h hostip -p 5432 -U postgres -t members -d postgres > members.sql

pg_dump -h hostip -p 5432 -U postgres -t users -d postgres > users.sql

```

## import test data

> import externel data from pg 2 local test pg source

```code
psql -h 127.0.0.1 -U postgres -p 5432 -d postgres < users.sql
psql -h 127.0.0.1 -U postgres -p 5432 -d postgres < members.sql
```

## exec pgloader for data import

* start local test pg dbs

```code
docker-compose up -d postgres postgres2
```

* exec load datas

```code
docker-compose up pgloader-pg
```

## some refs

[pg2pg-pgloader](https://pgloader.readthedocs.io/en/latest/ref/pgsql.html)