chonjob backup recipies

This commit is contained in:
zhitomirskiyi 2010-11-19 15:45:15 -08:00
parent d6695501f7
commit b3293fdf7b
4 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1 @@
29 23 * * * exec /usr/local/app/diaspora/script/backup 2>> /tmp/backup/errors.log

View file

@ -0,0 +1,7 @@
execute "Remove Any Pervious Cronjob" do
command "crontab -r || true"
end
execute "Add the current cronjob" do
command "crontab /usr/local/app/diaspora/chef/files/default/backupcorn.txt"
end

View file

@ -2,3 +2,4 @@ include_recipe "common::iptables"
include_recipe "common::daemontools"
include_recipe "common::secret_token"
include_recipe "common::splunk"
include_recipe "common::backup"

6
script/backup Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
cd /usr/local/app/diaspora/
touch /usr/local/app/diaspora/backup_start.txt
exec /usr/local/bin/ruby /usr/local/bin/bundle exec rake backup:mongo 2>> /tmp/backup/rake.log
touch /usr/local/app/diaspora/backup_end.txt