26

I have tried to install pg_dump as part of installation of postgres-client, however it does not include pg_dump.

Can pg_dump be installed without a full installation of postgres on Alpine Linux?

valiano
  • 16,433
  • 7
  • 64
  • 79
Oleg
  • 601
  • 1
  • 8
  • 14
  • 5
    Note for future readers - this is no longer the case: `apk add postgresql-client` installs `pg_dump` – Jethro Oct 07 '19 at 14:50

2 Answers2

30

No - to install pg_dump and associated utilities, you'll need to run apk add postgresql, which will install the full PostgreSQL suite.

The installed size is currently 12.1mb (for v9.6.0-r1) vs just 451kb for postgresql-client, so it's definitely bigger. If you're using Alpine in Docker, that might not be a big deal. If you're using it in an embedded device where size matters, you could simply copy over pg_dump or whatever else you need.

Edit: This is no longer true. apk add --no-cache postgresql-client is sufficient.

Lee Benson
  • 11,185
  • 6
  • 43
  • 57
  • 3
    Is this still the case for alpine? [This link](https://pkgs.alpinelinux.org/contents?file=pg_dump&path=&name=&branch=edge&repo=main&arch=x86) seems to indicate that pg_dump is now part of postgresql-client – Dirk Apr 11 '18 at 09:21
  • 10
    Indeed `apk add --no-cache postgresql-client` is now enough for the pg_dump binary – user2757652 Jul 09 '18 at 10:32
22

The answer to this question is yes.

Rob
  • 1,656
  • 2
  • 17
  • 33