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-2.0.2 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.1 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre12 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre11 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre10 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre9 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre8 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre7 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre6 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre5 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre4 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre3 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre2 templates/redis/config/rubber/role/redis/crontab
rubber-2.0.0.pre1 templates/redis/config/rubber/role/redis/crontab