Skip to content
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

Adds an overwrite flag to force annotation updates #70

Merged
merged 5 commits into from
Oct 27, 2023

Conversation

tony-landreth
Copy link
Contributor

Issue: PGO-39

internal/cmd/backup.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@benjaminjb benjaminjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, a few questions. Also, think we'll want a parallel change made in restore?

docs/content/reference/pgo_backup.md Outdated Show resolved Hide resolved
internal/cmd/backup.go Outdated Show resolved Hide resolved
internal/cmd/backup.go Outdated Show resolved Hide resolved
internal/cmd/backup.go Outdated Show resolved Hide resolved
internal/cmd/backup.go Outdated Show resolved Hide resolved
testing/kuttl/e2e/backup/02--backup-with-flags.yaml Outdated Show resolved Hide resolved
testing/kuttl/e2e/backup/12--backup-with-overwrite.yaml Outdated Show resolved Hide resolved
@tony-landreth tony-landreth force-pushed the add-overwrite-to-backup branch 4 times, most recently from 0e4c26f to f7c4e7b Compare October 24, 2023 21:05
@@ -53,15 +53,19 @@ pgo backup hippo
# Update the 'backups.pgbackrest.manual.repoName' and 'backups.pgbackrest.manual.options' fields
# on the 'hippo' postgrescluster and trigger a backup
pgo backup hippo --repoName="repo1" --options="--type=full"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not your change, but can you look at line 40 -- I don't like that it uses the word "overwrite" when that's not what we do unless you use the overwrite flag

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the new text work?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's ~3 cases here that we (maybe) want to cover:
a) take a backup with the settings already in the spec
b) take a backup with new settings that you write to the spec
c) take a backup with new settings that you write to the spec -- even if someone else owns those settings.

Maybe something like (but better than):

Backup allows you to take a backup of a PostgreSQL cluster, either using
the current "spec.backups.pgbackrest.manual" settings on the PostgreSQL cluster
or by writing those settings using the flags (potentially overwriting them with the
`--force-conflicts` flag).

(I don't think we actually want parentheses in our docs. Maybe we just want to say "you can take backups with the settings that are there or write those settings" and mention the overwrite situation in the flag description? No, I think people will run into that, we probably want to bring it up in this summary.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this?

@tony-landreth tony-landreth force-pushed the add-overwrite-to-backup branch 6 times, most recently from bbdcd72 to 7cec13c Compare October 26, 2023 18:28
Copy link
Contributor

@tjmoore4 tjmoore4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good over all, just need to remove one file.

crunchy_k8s_support_export_2023-10-24-162950-0400.tar.gz Outdated Show resolved Hide resolved
@tony-landreth tony-landreth force-pushed the add-overwrite-to-backup branch from 7cec13c to 3f35acf Compare October 26, 2023 18:39
internal/cmd/backup.go Outdated Show resolved Hide resolved
@tony-landreth tony-landreth force-pushed the add-overwrite-to-backup branch 6 times, most recently from 190e814 to 677c983 Compare October 26, 2023 21:47
internal/cmd/restore.go Outdated Show resolved Hide resolved
@tony-landreth tony-landreth force-pushed the add-overwrite-to-backup branch from 9b476ce to fe4e162 Compare October 27, 2023 15:05
@tony-landreth tony-landreth merged commit a7009c6 into CrunchyData:main Oct 27, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants