Created
March 1, 2013 20:04
-
-
Save r38y/5067338 to your computer and use it in GitHub Desktop.
Recipe to wrap EY backups with a snitch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set backup interval | |
# cron_hour = if node[:backup_interval].to_s == '24' | |
# "1" # 0100 Pacific, per support's request | |
# # NB: Instances run in the Pacific (Los Angeles) timezone | |
# elsif node[:backup_interval] | |
# "*/#{node[:backup_interval]}" | |
# else | |
# "1" | |
# end | |
cron_hour = "*/6" | |
if ['db_master'].include?(node[:instance_role]) | |
cron "mysql" do | |
minute '10' | |
hour cron_hour | |
day '*' | |
month '*' | |
weekday '*' | |
command 'm=`time ( /usr/local/ey_resin/bin/eybackup ) 2>&1 > /dev/null` && curl -d "m=$m" https://nosnch.in/CHANGEME &> /dev/null' | |
not_if { node[:backup_window].to_s == '0' } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment