dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Why does not the default snapshot strategy remove the old and useless dump file?

Open XiaooLei opened this issue 2 years ago • 3 comments

Discussed in https://github.com/dragonflydb/dragonfly/discussions/1353

Originally posted by XiaooLei June 5, 2023 I am trying to use dragonfly in our systems, but when I was configuring it, I found the the default strategy just don't remove the old snapshot files even if new snapshot file is generated, and as time goes, the snapshot files grows so big and takes up so much storage space. this is different than the Redis snapshot strategy. I finally managed to make it align to Redis by adding command args '''--dbfilename dump.rdb --nodf_snapshot_format''' , But I still can not figure out why dragonfly team use such a seeming useless snapshot strategy? Really appreciated if my question could be answered

XiaooLei avatar Jun 09 '23 02:06 XiaooLei

@XiaooLei why did you specify --nodf_snapshot_format?

romange avatar Jun 09 '23 19:06 romange

@XiaooLei by default dragonfly will use filename with timestamp for saving snapshot. If you dont want to have snapshot file per timestamp you can use the flag --dbfilename f.e --filename dump (dont add file extension). Here you can see the documentation https://www.dragonflydb.io/docs/command-reference/server-management/save

adiholden avatar Jun 19 '23 08:06 adiholden

@XiaooLei why did you specify --nodf_snapshot_format?

because the snapshot file take too much storage space, I tried make the snapshot file to be the same as redis, and by specifing --nodf_snapshot_format and --dbfilename dump.rdb, it worked.

XiaooLei avatar Jun 19 '23 08:06 XiaooLei

yes, we could flip the default and avoid timestamps. I am opening a separate issue for that and closing this one.

romange avatar Jul 13 '23 07:07 romange