Sha256: 0687024684b1a39c1d68509538097ebc9fbd097fe4ccbbabce86776e537ce297

Contents?: true

Size: 654 Bytes

Versions: 141

Compression:

Stored size: 654 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 * * * <%= Rubber.root %>/script/rubber cron --task util:backup_db --directory=/mnt/db_backups --dbuser=<%= rubber_env.db_user %> --dbpass=<%= rubber_env.db_pass %> --dbname=<%= rubber_env.db_name %> --dbhost=<%= backup_db_host.full_name %>

<% end %>

Version data entries

141 entries across 75 versions & 1 rubygems

Version Path
rubber-3.2.2 templates/mysql/config/rubber/role/db/crontab
rubber-3.2.2 templates/percona/config/rubber/role/db/crontab
rubber-3.2.1 templates/mysql/config/rubber/role/db/crontab
rubber-3.2.1 templates/percona/config/rubber/role/db/crontab
rubber-3.2.0 templates/percona/config/rubber/role/db/crontab
rubber-3.2.0 templates/mysql/config/rubber/role/db/crontab
rubber-3.1.0 templates/mysql/config/rubber/role/db/crontab
rubber-3.1.0 templates/percona/config/rubber/role/db/crontab
rubber-3.0.1 templates/percona/config/rubber/role/db/crontab
rubber-3.0.1 templates/mysql/config/rubber/role/db/crontab
rubber-3.0.0 templates/percona/config/rubber/role/db/crontab
rubber-3.0.0 templates/mysql/config/rubber/role/db/crontab
rubber-2.16.0 templates/mysql/config/rubber/role/db/crontab
rubber-2.16.0 templates/percona/config/rubber/role/db/crontab
rubber-2.15.2 templates/mysql/config/rubber/role/db/crontab
rubber-2.15.2 templates/percona/config/rubber/role/db/crontab
rubber-2.15.1 templates/mysql/config/rubber/role/db/crontab
rubber-2.15.1 templates/percona/config/rubber/role/db/crontab
rubber-2.15.0 templates/mysql/config/rubber/role/db/crontab
rubber-2.15.0 templates/percona/config/rubber/role/db/crontab