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

support update, enable and disable backup policy #203

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

posriniv
Copy link
Collaborator

@posriniv posriniv commented Dec 1, 2023

bash-5.2$ ./ybm backup policy update --cluster-name=loving-squid --retention-period-in-days=2  --full-backup-frequency-in-days=10 
Successfully updated backup policy for cluster loving-squid

bash-5.2$ ./ybm backup policy list --cluster-name=loving-squid
Time Interval(days)   Days of the Week   Backup Start Time
10                    NA                 NA

bash-5.2$ ./ybm backup policy update --cluster-name=loving-squid --retention-period-in-days=2  --full-backup-schedule-days-of-week=th,fr,sa,su --full-backup-schedule-time=23:05
Successfully updated backup policy for cluster loving-squid

bash-5.2$ ./ybm backup policy list --cluster-name=loving-squid
Time Interval(days)   Days of the Week   Backup Start Time
NA                    Su,Th,Fr,Sa        23:05
bash-5.2$ ./ybm backup policy disable --cluster-name=loving-squid
Successfully disabled backup policy for cluster loving-squid

bash-5.2$ ./ybm backup policy list --cluster-name=loving-squid
A newer version is available. Please upgrade to the latest version v0.1.17
No backup policies found for the given cluster

bash-5.2$ ./ybm backup policy enable --cluster-name=loving-squid
Successfully enabled backup policy for cluster loving-squid

bash-5.2$ ./ybm backup policy list --cluster-name=loving-squid
Time Interval(days)   Days of the Week   Backup Start Time
NA                    Su,Th,Fr,Sa        23:05

This way, simple and custom backup policy can be configured through the CLI. Also, the policy can be either enabled or disabled. Relevant guards are put in place to restrict and guide the user to provide only the allowed set of flags.

@posriniv posriniv requested a review from a team as a code owner December 1, 2023 00:40
@posriniv posriniv requested review from cdavid and shinji62 December 1, 2023 00:40
@shinji62
Copy link
Collaborator

shinji62 commented Dec 4, 2023

Adding some test will be welcome

@posriniv
Copy link
Collaborator Author

posriniv commented Dec 4, 2023

@shinji62 @cdavid please take another look

@posriniv posriniv merged commit d65d9c5 into main Dec 5, 2023
2 checks passed
@posriniv posriniv deleted the posriniv/update-backup-policy branch December 5, 2023 01:11
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.

2 participants