Creating a ./pgdata folder (Docker)
When Informer is installed via Docker on Linux, we recommend reconfiguring Postgres to use a ./pgdata folder on the host rather than the default location inside the Postgres container. This keeps your data from being erased when the Postgres container is replaced, for example during a version upgrade.
If you are upgrading from a version prior to 5.0.9, you need to create this directory and adjust some configuration manually. Follow the steps below.
This procedure moves your database. Make a verified backup first.
-
Create a
./pgdatafolder in the same directory as yourdocker-compose.yml. -
Make a dump of the Postgres database:
docker-compose exec postgres pg_dump -U i5 i5 > i5_backup.sqlThis may prompt for your postgres password (whatever you configured; the default is
informer5). It can take a while depending on your data. When it finishes, verify thati5_backup.sqlhas contents (a file size greater than 0 KB). -
Edit
docker-compose.ymland add a volume underpostgresfor the pgdata folder, for example:postgres:image: postgres:9.6environment:- POSTGRES_USER=i5volumes:- ./pgdata:/var/lib/postgresql/data -
Stop the Postgres container:
docker-compose stop postgres -
Delete the Postgres container:
docker-compose rm postgres -
Start the Postgres container:
docker-compose up -d postgres -
Verify that the
./pgdatafolder now has contents. -
Load the backup into Postgres:
docker-compose exec postgres psql i5 -U i5 -f i5_backup.sql
If you run into any issues, contact Support at i5support@entrinsik.com.