Sha256: 4711711fce4e439089223f0538384fc8798430870849be213950cc3fcec434e8

Contents?: true

Size: 636 Bytes

Versions: 120

Compression:

Stored size: 636 Bytes

Contents

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

<%
  # Backup db every 3 hours to secondary db if available, else primary db
  backup_db_host = rubber_instances.for_role('db', {}).first rescue nil
  backup_db_host ||= rubber_instances.for_role('db', 'primary' => true).first
  if backup_db_host.name == rubber_env.host
%>
0 */3 * * * BACKUP_DIR=/mnt/db_backups DBUSER=<%= rubber_env.db_user %> DBPASS=<%= rubber_env.db_pass %> DBNAME=<%= rubber_env.db_name %> DBHOST=<%= backup_db_host.full_name %> <%= RUBBER_ROOT %>/script/cron-rake rubber:backup_db
<% end %>

Version data entries

120 entries across 80 versions & 7 rubygems

Version Path
rubber-jcarnegie-0.0.1 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.9.1 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.9.1 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.9.0 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.9.0 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.8.0 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.8.0 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
nogara-rubber-1.7.2 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
nogara-rubber-1.7.2 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.7.2 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.7.2 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.7.1 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.7.1 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.7.0 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.7.0 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.6.3 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.6.3 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.6.2 lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.6.2 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab
rubber-1.6.1 generators/vulcanize/templates/mysql/config/rubber/role/db/crontab