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
Feature request: Read-only config flag #2334
Comments
Hi, I reckon this kind of feature would be handy to facilitate recovery testing. However, this is way more complicated than what it sounds. In example, imagine setting up this "read-only" flag in the config file, what would (from a security point of view) prevent any user to modify that afterwards or even overwrite it with command-line argument (or even an environment variable). What you should do is configure that RO access at the mount/sharing time, system wide. Kind Regards |
So read-only S3-compatible will work ? The initial steps like I missed the bit about |
You don't need to run When you want to test a recovery, the only command that should be run are the |
Ah ok, that sort of thing wasn't at all clear from my reading of your docs which, understandably, takes a route of showing "create and restore to the same". Unless I missed it there isn't an example in the docs of a greenfield restore-only ? |
There is no "restore-only" docs because that's a very specific use-case. You basically need to understand what each command is used for and not just follow through some basic quick-starts. Recovery testing will also highly depend on the repository type and access. The only generic advice that we can give is the one I gave above. I mean you have a production backup repository and want to restore a backup from that repo on a test server, well you need to configure pgBackRest to access (in RO) this already existing repository and use the restore command. |
This is basically what the start/stop command do. When a stanza is stopped it is not possible to write to the repo. That's probably not too clear from the docs, though. Of course |
Oh, yeah you're right! I don't know why but I (wrongly) thought it would also create a stop file in the repo itself and we wouldn't want the production cluster to not be able to write to the repo while we're doing test restores 😅 The doc indeed says |
Unless I've missed it in the docs, there appears to be no "read-only" config flag available.
Use-case:
Say for example, I want to bring up a fork/clone of a database for testing purposes.
Clearly the way to do this would be to do a PITR off an existing pgbackrest repo.
Without a "read-only" config flag, I leave myself up to the possibility of a "fat finger" moment where I enter the wrong pgbackrest command and end up mangling my repo.
A "read-only" config flag would act as a safeguard mechanism to ensure that any command that makes modifications to a repo would be denied.
The text was updated successfully, but these errors were encountered: