Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about "/var/lib/postgresql/data" volume #53

Closed
steakhutzeee opened this issue May 11, 2021 · 6 comments
Closed

Question about "/var/lib/postgresql/data" volume #53

steakhutzeee opened this issue May 11, 2021 · 6 comments
Labels

Comments

@steakhutzeee
Copy link

Hi, have a little question.

I have actually this compose file:

  pgbackups:
    image: prodrigestivill/postgres-backup-local
    container_name: paperless-ng_db_bak
    restart: unless-stopped
    user: 1000:100
    volumes:
      - /srv/dev-disk-by-label-HC2/AppData/paperless-ng_db_bak/backups:/backups
      - pgbackups_data:/var/lib/postgresql/data
    depends_on:
      - db
    environment:
      - TZ=Europe/Rome
      - POSTGRES_CLUSTER=TRUE
      - POSTGRES_HOST=paperless-ng_db
      - POSTGRES_DB=xxx
      - POSTGRES_USER=xxx
      - POSTGRES_PASSWORD=xxx
      - POSTGRES_EXTRA_OPTS=
      - SCHEDULE=@midnight
      - BACKUP_KEEP_DAYS=7
      - BACKUP_KEEP_WEEKS=0
      - BACKUP_KEEP_MONTHS=0

I checked performing a manually backup and it works.

I just don't understand why a new volume is created with the container, pointing to /var/lib/postgresql/data. In my compose file i called the volume pgbackups_data just to recognize it.

Thank you in advance!

@prodrigestivill
Copy link
Owner

This volume is created by the parent docker image (the official postgresql docker image).
It is not used by this image.

@steakhutzeee
Copy link
Author

steakhutzeee commented May 20, 2021

This volume is created by the parent docker image (the official postgresql docker image).
It is not used by this image.

Strange, here is a detailed view from portainer:

volume

I named the volume in my compose so when i look at it i know what it is.

From my compose:

paperless-ng_db_bak:
    image: prodrigestivill/postgres-backup-local
    container_name: paperless-ng_db_bak
    restart: unless-stopped
    user: 1000:100
    volumes:
      - /srv/dev-disk-by-label-HC2/AppData/paperless-ng_db_bak/backups:/backups
      - pgbackups_data:/var/lib/postgresql/data

@steakhutzeee
Copy link
Author

Also here you can see that the "paperless-ng_db" container has its own bind mount for /var/lib/postgresql/data:

volume2

@prodrigestivill
Copy link
Owner

Please read the docker files I attach here.

This project imports the official postgresql docker image, and this last docker image is the one that creates the volume you are asking.

But this repository makes no use of the volume you are asking, it only uses the postgresql cli programs, don't start any postgresql server.

@steakhutzeee
Copy link
Author

Please read the docker files I attach here.

This project imports the official postgresql docker image, and this last docker image is the one that creates the volume you are asking.

But this repository makes no use of the volume you are asking, it only uses the postgresql cli programs, don't start any postgresql server.

Thanks. So it's normal to have that volume in this image. Correct?

@prodrigestivill
Copy link
Owner

Yes, it it will never be used.

Repository owner locked and limited conversation to collaborators Aug 20, 2022
@prodrigestivill prodrigestivill converted this issue into discussion #96 Aug 20, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants