Skip to content
Browse files

daily backup

  • Loading branch information...
1 parent c6f41a2 commit d07d8cc47113b6a17018a80e095792af5650c102 @akwiatkowski committed Aug 9, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 trunk/ruby_server/tools/backup/meas_backup.rb
View
10 trunk/ruby_server/tools/backup/meas_backup.rb
@@ -12,11 +12,15 @@
#first_meas = MeasArchive.order(:time_from).first
#puts "... first meas time #{first_meas.time_from}"
#time = first_meas.time_from.beginning_of_day
-time = Time.at(1309381405).beginning_of_day - 1.day
-time_limit = Time.now.end_of_day
+# initial backup
+#time = Time.at(1309381405).beginning_of_day - 1.day
+#time_limit = Time.now.end_of_day
+
+
# later as daily backup
-#time = Time.now.end_of_day - 7.days
+time = (Time.now.end_of_day - 7.days).beginning_of_day
+time_limit = Time.now.end_of_day
puts "#{(time_limit - time) / 1.days} days to go"

0 comments on commit d07d8cc

Please sign in to comment.
Something went wrong with that request. Please try again.