I will have a rather-small Redis store (typically 100 Megabytes to a few
Gigabytes) but I want to keep a few RDB snapshots.
I am working on the MELT monitor; MELT is a DSL to customize GCC (see
http://gcc-melt.org/ for more...); its monitor -in pre-alpha stage- will be
a *persistent* application
which would keep persistent compiler representation and provide a web
interface (my dream is a Coverity like free software tool based upon MELT &
GCC) . The persistent aspect could use REDIS. The monitor is checkpointing
(à la SBCL save-lisp-and-die
<http://www.sbcl.org/manual/index.html#Function-sb_002dext_003asave_002dlisp_002dand_002ddie>
primitive) its memory state into GDBM files and/or REDIS stores (so it
begins to erase the old REDIS store with FLUSHDB then regenerates that
store entirely with many SET commands; I am not able to do some incremental
checkpointing).
On my Debian/Sid machine, the default RDB snapshot (after some BGSAVE
command...) is going into /var/lib/redis/dump.rdb
I discovered on this forum that it is possible to slightly change that. If
I issue the two REDIS commands
CONFIG SET dbname myredis.rdb
BGSAVE
then the RDB snapshot is going into /var/lib/redis/myredis.rdb
However, I would like that before writing that RDB dump, the REDIS server
renames its previous version as /var/lib/redis/myredis.rdb~ or as
/var/lib/redis/myredis.rdb.1 and rename that previous backup as
/var/lib/redis/myredis.rdb~~ or as /var/lib/redis/myredis.rdb.2 (or perhaps
run logrotate on the backups).
How is that possible? The point is that I want the file rotation or
renaming to happen on the server side. Should I do some Lua scripting?
It is important for me to keep at least two or three last snapshot files of
the Redis store.
There is only one writing REDIS client application - the checkpointing MELT
monitor - (but it could be a remote one). Every other clients are read-only!
Regards.
PS. I don't want AOF persistence, I only want RDB.
--
Basile Starynkevitch (France) http://starynkevitch.net/Basile/
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redis-db@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Basile Starynkevitch (France) http://starynkevitch.net/Basile/
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redis-db@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.