11

I don't know anything about redis and right now i have to free disk space before it fills up. I see some old redis files in /var/lib/redis/ and the file names are like

dump1252.rdb
dump1254.rdb
dump1256.rdb
dump1253.rdb
dump1255.rdb
temp-1982.rdb
temp-10259.rdb temp-1586.rdb
temp-1248.rdb

Is it safe to delete old ones?

Mia
  • 111
  • 1
  • 1
  • 4

1 Answers1

7

The redis database resides entirely in memory. The .rdb files are dumps to disk, for backup or persistence. It should be safe to delete them assuming you're sure you don't need the contents.

Jim G.
  • 2,607
  • 1
  • 18
  • 19
  • 1
    Okay. So eventually does it get flushed or get deleted automatically? OR should I remove it manually or write a script to delete old files? – Mia Nov 12 '14 at 21:59
  • 1
    Depends on your configuration, but I'm guessing it's currently keeping the last X dumps. If you post configuration we can tell you. – Jim G. Nov 12 '14 at 22:35
  • 1
    Docs on redis persistence settings: https://redis.io/topics/persistence – gdvalderrama Apr 13 '20 at 10:00
  • @JimG. it's my first time encountering this file (not a regular user of redis). I googled how one can get its config by running the redis cli by typing `redis-cli`, and then typing `CONFIG GET *` to view the config. What I see seems to be the config, but it looks messy. is there a cleaner way to view the config? – stevec Feb 28 '22 at 00:08