Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I install pg_dump without installing postgres on Alpine?

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?

like image 701
Oleg Avatar asked Nov 16 '16 09:11

Oleg


People also ask

How install PostgreSQL offline Linux?

Red Hat Enterprise Linux 7 Go to https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-7-x86_64/ and download the specified version of the following packages: postgresql12-libs. postgresql12. postgresql12-server.

What is path to pg_dump?

pg_dump is normally in your install dir. Something like C:\\PostgreSQL\pg96/binpg_dump.exe.


2 Answers

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.

like image 185
Lee Benson Avatar answered Sep 24 '22 14:09

Lee Benson


The answer to this question is yes.

  • postgresql-client, 2.39 MB installed, does contain the pg_dump command

  • postgresql-dev, 9.13 MB installed, does not contain pg_dump but is required by psycopg2.

  • postgresql, 33.66 MB installed does not contain pg_dump

like image 24
Rob Avatar answered Sep 23 '22 14:09

Rob