Skip to content

Commit

Permalink
Support for renaming the dump.rdb file (#168)
Browse files Browse the repository at this point in the history
* db filename variable

* fix typo I think

* set default to dump.db to ensure backwards compatibility

* now I can type
  • Loading branch information
rathboma authored and DavidWittman committed Oct 13, 2017
1 parent dda329b commit 0b5887b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ redis_slowlog_max_len: 128
redis_maxmemory: false
redis_maxmemory_policy: noeviction
redis_rename_commands: []
redis_db_filename: dump.rdb
# How frequently to snapshot the database to disk
# e.g. "900 1" => 900 seconds if at least 1 key changed
redis_save:
Expand Down
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ redis_slowlog_max_len: 128
redis_maxmemory: false
redis_maxmemory_policy: noeviction
redis_rename_commands: []

# the file name for the RDB Backup
redis_db_filename: "dump.rdb"

# How frequently to snapshot the database to disk
# e.g. "900 1" => 900 seconds if at least 1 key changed
redis_save:
Expand Down
2 changes: 1 addition & 1 deletion templates/redis.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ save {{ save }}
stop-writes-on-bgsave-error {{ redis_stop_writes_on_bgsave_error|string }}
rdbcompression {{ redis_rdbcompression|string }}
rdbchecksum {{ redis_rdbchecksum|string }}
dbfilename dump.rdb
dbfilename {{ redis_db_filename|string }}

# Replication
{% if redis_slaveof -%}
Expand Down

0 comments on commit 0b5887b

Please sign in to comment.