Why does not the default snapshot strategy remove the old and useless dump file?
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 why did you specify --nodf_snapshot_format?
@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
@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.
yes, we could flip the default and avoid timestamps. I am opening a separate issue for that and closing this one.