3
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 29 Apr 2025
3 points (80.0% liked)
Self Hosted - Self-hosting your services.
12522 readers
1 users here now
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules
- No harassment
- crossposts from c/Open Source & c/docker & related may be allowed, depending on context
- Video Promoting is allowed if is within the topic.
- No spamming.
- Stay friendly.
- Follow the lemmy.ml instance rules.
- Tag your post. (Read under)
Important
Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!
- Lemmy doesn't have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate.
Cross-posting
- !everything_git@lemmy.ml is allowed!
- !docker@lemmy.ml is allowed!
- !portainer@lemmy.ml is allowed!
- !fediverse@lemmy.ml is allowed if topic has to do with selfhosting.
- !selfhosted@lemmy.ml is allowed!
If you see a rule-breaker please DM the mods!
founded 4 years ago
MODERATORS
That's working as intended; as the compose docs state, the command passed by
run
overrides the command defined in the service configuration, so it wouldn't normally be possible to actually shut down all the containers and then usedocker compose run
to interact with one of them. Run doesn't start anything up in the container other than the command you pass to it.I'm not familiar with funkwhale, but they probably meant either to (a) shut down all the containers except postgres so that running
pg_dump
has something to connect to, or (b) useexec
as you have done.Personally, I do what you did, and use
exec
most of the time to do database dumps. AFAIK, postgres doesn't require that all other connections to it are closed before usingpg_dump
. It begins a transaction at the time you run it, so it's not interfering with anything else going on while it produces output (see relevant SO answer here). You could probably just leave your entire funkwhale stack up when you usedocker compose exec
to runpg_dump
.Here’s the funkwhale page: https://docs.funkwhale.audio/administrator/upgrade/backup.html
Looks light a oversight on their part. Thanks for the advice.
I remember reading that copying a database while it’s in use is risky. Good to know pg_dump handles this correctly.