Sha256: 96e011d819f1cc3133e53d7d62a79fb75939623f45694902728c04c902050627

Contents?: true

Size: 670 Bytes

Versions: 62

Compression:

Stored size: 670 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('postgresql_slave').first rescue nil
  backup_db_host ||= rubber_instances.for_role('postgresql_master').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

62 entries across 62 versions & 1 rubygems

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