Sha256: f4fca5355f831955f526caf52bf28806a51bc27db5bd84fb4d15b07609b077d9

Contents?: true

Size: 664 Bytes

Versions: 75

Compression:

Stored size: 664 Bytes

Contents

<%
  @read_cmd = 'crontab -l'
  @write_cmd = 'crontab -'
  @additive = ['# start-redis-crontab', '# end-redis-crontab']
%>

<%
  # Backup db every 3 hours to secondary db if available, else primary db
  backup_redis_host = rubber_instances.for_role('redis_slave').first rescue nil
  backup_redis_host ||= rubber_instances.for_role('redis_master').first
  if backup_redis_host.name == rubber_env.host
%>

# Backup redis DBs every hour.
0 * * * * <%= Rubber.root %>/script/rubber cron --task util:backup --directory=/mnt/redis_backups --name=redis --command="nice zip -r \%dir\%/\%name\%_\%time_stamp\%.zip <%= rubber_env.redis_db_dir %> -x \*temp\*.rdb"

<% end %>

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
rubber-3.2.2 templates/redis/config/rubber/role/redis/crontab
rubber-3.2.1 templates/redis/config/rubber/role/redis/crontab
rubber-3.2.0 templates/redis/config/rubber/role/redis/crontab
rubber-3.1.0 templates/redis/config/rubber/role/redis/crontab
rubber-3.0.1 templates/redis/config/rubber/role/redis/crontab
rubber-3.0.0 templates/redis/config/rubber/role/redis/crontab
rubber-2.16.0 templates/redis/config/rubber/role/redis/crontab
rubber-2.15.2 templates/redis/config/rubber/role/redis/crontab
rubber-2.15.1 templates/redis/config/rubber/role/redis/crontab
rubber-2.15.0 templates/redis/config/rubber/role/redis/crontab
rubber-2.14.0 templates/redis/config/rubber/role/redis/crontab
rubber-2.13.1 templates/redis/config/rubber/role/redis/crontab
rubber-2.13.0 templates/redis/config/rubber/role/redis/crontab
rubber-2.12.2 templates/redis/config/rubber/role/redis/crontab
rubber-2.12.1 templates/redis/config/rubber/role/redis/crontab
rubber-2.12.0 templates/redis/config/rubber/role/redis/crontab
rubber-2.11.0 templates/redis/config/rubber/role/redis/crontab
rubber-2.10.2 templates/redis/config/rubber/role/redis/crontab
rubber-2.10.1 templates/redis/config/rubber/role/redis/crontab
rubber-2.10.0 templates/redis/config/rubber/role/redis/crontab