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

Create immediate snapshot ability and boolean for schedules with longer intervals. #309

Open
croadfeldt opened this issue Jan 19, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@croadfeldt
Copy link

Describe the feature you'd like to have.
For longer snpashot intervals such as yearly snapshots, it would be nice to get an immediate snapshot and then honor the schedule as defined after that. This behavior could be turned on or off with a boolean.

eg; yearly
cron: 0 0 1 1 *
effective date: 2023-01-18
desired action: yearly snapshot created with 2023-01-18 snapshot, then next yearly snapshot on 2024-01-01

For that matter, every schedule could have a flag to create an immediate snapshot if no existing snapshots exist for that interval.

What is the value to the end user? (why is it a priority?)
No manual snapshots needed at the beginning of the snapshot schedule.
No manipulating cron entries to get semi-immediate initial snapshot made for each interval.

How will we know we have a good solution? (acceptance criteria)
Each snapshot schedule adds a flag to create an immediate snapshot. When that flag is set and a schedule is implemented in a namespace, all relevant PVCs are snapshotted immediately and then on their defined schedules afterward.

Additional context
If i get some time, will take a stab at pushing enough characters around the screen to million monkey shakespeare it, until then putting this RFE in. :)

@croadfeldt croadfeldt added the enhancement New feature or request label Jan 19, 2023
@croadfeldt croadfeldt changed the title Backfill snapshots for schedules that missed assigned start parameters. Create immediate snapshot ability and boolean for schedules with longer intervals. Jan 19, 2023
@kinoute
Copy link

kinoute commented Jun 4, 2024

That would be great indeed to trigger manually a snapshot.

@JohnStrunk
Copy link
Member

I'm not a big fan of adding lots of configuration options since it both complicates things for users as well as makes testing much harder.

In lieu of this option, you should be able to manually create a snapshot and apply a label w/ the name of the schedule you want it to belong to. It would then get expired according to the schedule's retention policy. For example, if you had a SnapshotSchedule named myschedule, you should be able to label a manually created VolumeSnapshot with:

metadata:
  labels:
    snapscheduler.backube/schedule: myschedule

The snapshot would then be treated as though it had been created by the myschedule schedule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants