Move default data bind mount from system directory to local directory#596
Move default data bind mount from system directory to local directory#596spwoodcock wants to merge 4 commits intogetodk:nextfrom
Conversation
|
@spwoodcock or anyone else: any context on what It looks like it was introduced in fe34e41, but I can't find any reference to it in any of the following repos: |
|
It's intended to be a convenience that gives us a single way to document how to do backup restores: https://docs.getodk.org/central-backup/#restoring-a-backup @brontolosone is also looking at changes to backups so now's a good time to revive this, I think. |
If that's its sole purpose, then I wonder if we could get rid of it altogether — that busywork of shuffling files around, and thus the fuss around this mount and its defaults and migration strategy. Less is more! From the backup restore docs, this is when it's used:
So I'm thinking, we could spool the backup in via
One can convince oneself that this works by running the following, which makes the On the One sidecatch bonus effect of this approach is that things are easier to utilize, automate, and test; one could in fact This way we could remove the footnotes*) Though due to the spooling, that's a fake streaming sensation: the central side needs to spool its stdin to a tempfile because the current archive format is not actually streamable (as the |
|
I generally pipe + stdin for my pg_dump and pg_restore, so that sounds good to me! Perhaps it looks more convoluted to an end user, but as long as there are well documented commands. Plus the less bind mounts used, the better the transferability to Kubernetes 😃 |
|
Great! How about we close this and @brontolosone you can remove the bind mount and update the restore process as part of the backup overhaul? |
|
Thanks, @spwoodcock! |
See https://forum.getodk.org/t/odk-central-make-data-directory-configurable/44760/5
What has been done to verify that this works as intended?
I can start the compose stack without issue.
Why is this the best possible solution? Were any other approaches considered?
This offers flexibility of user configuration, plus a sane default.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Any users with data located under
/data/transferwill have to either:.envwithDATA_DIR=/data/transfer../data/transfer, relative to the git repo.DATA_DIRaccordingly.Does this change require updates to documentation? If so, please file an issue here and include the link below.
Yes, I will PR the docs after this is approved.
Before submitting this PR, please make sure you have:
nextbranch OR only changed documentation/infrastructure (masteris stable and used in production)