Sha256: 9ce2b45ef8d949bbe02092016e3e86d60b92960e8e439062859226ab6aba6e09

Contents?: true

Size: 664 Bytes

Versions: 13

Compression:

Stored size: 664 Bytes

Contents

<%
  @read_cmd = 'crontab -l'
  @write_cmd = 'crontab -'
  @additive = ["# rubber-postgresql-start", "# rubber-postgresql-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

13 entries across 13 versions & 1 rubygems

Version Path
rubber-2.0.0 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre12 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre11 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre10 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre9 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre8 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre7 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre6 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre5 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre4 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre3 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre2 templates/postgresql/config/rubber/role/db/crontab
rubber-2.0.0.pre1 templates/postgresql/config/rubber/role/db/crontab