Coder Social home page Coder Social logo

Comments (5)

ricardolyn avatar ricardolyn commented on May 20, 2024 2

I find this useful too to have one that as the lastest snapshot. is there a plan to include this feature?

from snapscheduler.

PSjoe avatar PSjoe commented on May 20, 2024 1

I just realized this isn't a trivial ask, since you cannot rename Kubernetes objects.

About the only way I could envision it working is if any given snapshot schedule invocation created two at the same time. One with the usual naming, and one with a name of '-latest'. Of course, each invocation would have to delete the existing '-latest' before proceeding.

from snapscheduler.

JohnStrunk avatar JohnStrunk commented on May 20, 2024

For just the reason you mention (being able to easily reference the "latest"), I'd have much preferred a naming scheme like schedule-0, schedule-1, ... for each of the snaps that are retained (0 being the most recent). But, as you mentioned, renaming is not directly supported.

It would be possible to create a 2nd, "-latest" as you suggest, though I'm concerned about 2 things:

  • Delete before create means that a failure could leave you with no "latest"
  • Since it would be 2 snapshot operations (timestamp + latest), the data wouldn't be identical between the timestamped snap and the one named latest. I don't know whether that would matter to anyone or not.

One interesting thing that's coming in kubernetes is the notion of "data populators."
They will make it possible to create a populator that goes with SnapScheduler, effectively allowing you to use the SnapshotSchedule as the PVC's dataSource. The populator would then restore the latest snapshot when the PVC gets created.

BTW, thanks for the feedback. Glad to see it's being used!

from snapscheduler.

PSjoe avatar PSjoe commented on May 20, 2024

Yeah, it was really the exact answer I needed for my use case! Well, almost exact. :)

In my particular use case, the difference between "latest" and the "date stamp" version wouldn't matter. I just want to get "as close as possible" and keep a couple of old copies "just in case". The exact time of the backup isn't nearly as relevant. So even in that short time where there's no "latest", I could always manually go back to the one just before.

And presumably, this would be something you could toggle on and off, since not everyone would need it.

Regardless, thanks for putting this together! Even as is it's a great help. If I knew how to write Go, I'd take a stab at this feature request myself. But alas, I have to "serverfault" my way though bash scripting most of the time.

from snapscheduler.

JohnStrunk avatar JohnStrunk commented on May 20, 2024

I don't have immediate plans to work on it, but I'd be happy to shepherd a contribution of this feature.

from snapscheduler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.