Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis disable snapshots #321

Open
rmalenko opened this issue Aug 15, 2019 · 4 comments
Open

redis disable snapshots #321

rmalenko opened this issue Aug 15, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@rmalenko
Copy link

  1. Disable AOF by setting the appendonly configuration directive to no (it is the default value)
  2. Disable RDB snapshotting by disabling (commenting out) all of the save configuration directives (there are 3 that are defined by default)

I have changed for Redis 5.5 this template redis.conf.erb to have uncommented this string save ""

# Save the DB on disk:
# ...
#   It is also possible to remove all the previously configured save
#   points by adding a save directive with a single empty string argument
#   like in the following example:
#
#   save ""

<% if @save_db_to_disk %>
    <%- @save_db_to_disk_interval.sort_by{|k,v|k}.each do |seconds, key_change| -%>
    save <%= seconds -%> <%= key_change -%> <%= "\n" -%>
<%- end -%>
    <% else %>save ""
<% end %>
@juniorsysadmin juniorsysadmin added the enhancement New feature or request label Aug 17, 2019
@jeandoBet
Copy link

Hi,

Any update on this ? Will it be implemented ?

Thanks,

@cjacobsatnwea
Copy link

cjacobsatnwea commented Feb 28, 2023

There is a lot more options/etc in redis than this module provides. I have worked around this in my local work by:

  • setting up my own redis.conf.puppet-ish file (not the same one by this module)
  • inserting exec between Exec['cp -p /etc/redis/redis.conf.puppet /etc/redis/redis.conf'] and Service['redis'] where above file is appended to redis.conf

example of the insertion logic (however you add to the redis.conf is up to reader):

        notify      => Service['redis'],
        refreshonly => true,
        subscribe   => Exec['cp -p /etc/redis/redis.conf.puppet /etc/redis/redis.conf'],

paths might be different for your configs, and above could use vars defining those of course.

your exec could even be a cli command removing/replacing a config entry: sed -i 's/^save.*/save ""/g' /etc/redis/redis.conf for this specific case - don't even need your own .conf to add on. :)

@ThiefMaster
Copy link
Contributor

ThiefMaster commented May 26, 2023

I'll use my own template. But seriously, this issue is open for nearly 4 years now. Can't something as trivial as this be implemented?!

(someone who cares enough should probably open a PR though ;))

@kenyon
Copy link
Member

kenyon commented May 26, 2023

I'll use my own template. But seriously, this issue is open for nearly 4 years now. Can't something as trivial as this be implemented?!

Not if nobody creates a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants