Sha256: 59cfe0cf6de576046e5d8a53996de47ada8ba9e6bc9937f5a233ca7b8cf7b50d

Contents?: true

Size: 646 Bytes

Versions: 80

Compression:

Stored size: 646 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 * * * 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

80 entries across 40 versions & 6 rubygems

Version Path
rubber-1.15.0 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.15.0 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.14.1 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.14.1 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.14.0 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.14.0 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.13.2 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.13.2 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.13.1 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.13.1 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.13.0 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.13.0 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.12.2 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.12.2 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.12.1 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.12.1 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.12.0 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.12.0 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.11.0 lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab
rubber-1.11.0 generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab