dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
24.59k stars 890 forks source link

FR: Allow setting amount of snapshots (logrotate for snapshots) #2824

Open applike-ss opened 3 months ago

applike-ss commented 3 months ago

Is your feature request related to a problem? Please describe. We are trying dragonfly out with a network storage attached to it - limited to a certain size. Since dragonfly doesn't look like it is removing old snapshots (does it?), this volume in kubernetes is getting full quickly.

Describe the solution you'd like I would like to be able to specify a max_snapshot_count flag to limit the amount of snapshots retained.

Describe alternatives you've considered Not using a backing storage - not idea though.

Additional context

romange commented 3 months ago

if you run with --dbfilename=dump you will get the same snapshot overwritten again and again.

applike-ss commented 3 months ago

That will be enough for a start. How about allowing e.g. 3/5/10 snapshots?

SergeRegoor commented 2 weeks ago

We're running Dragonfly using the k8s operator, and are missing control over the snapshots. Specifying the number of shapshots would be great.

In the meantime, how can we use the --dbfilename=dump parameter using the k8s operator?

romange commented 2 weeks ago

@Abhra303 can you please answer @SergeRegoor ?

Abhra303 commented 2 weeks ago

@SergeRegoor, just pass the parameter in the args list -

spec:
  args:
   - "--dbfilename=dump"

See Operator Configuration

SergeRegoor commented 2 weeks ago

Thank you @Abhra303, works perfectly.