Skip to content
Browse files

Merge branch 'master' of git://github.com/aroth/backup_fu into aroth/…

…master
  • Loading branch information...
2 parents 9e266fc + c87e81e commit f377f5567ba09f13a0165b6f6cf8e4892e7acc78 Jonathan Vaught committed Jun 25, 2008
Showing with 9 additions and 8 deletions.
  1. +9 −8 lib/backup_fu.rb
View
17 lib/backup_fu.rb
@@ -14,6 +14,7 @@ def initialize
@fu_conf = fu_conf[RAILS_ENV].symbolize_keys
@fu_conf[:mysqldump_options] ||= '--complete-insert --skip-extended-insert'
@verbose = !@fu_conf[:verbose].nil?
+ @timestamp = datetime_formatted
check_conf
create_dirs
end
@@ -153,8 +154,7 @@ def dump_base_path
end
def db_filename
- date_formatted = Time.now.strftime("%Y-%m-%d")
- "#{@fu_conf[:app_name]}_#{date_formatted}_db.sql"
+ "#{@fu_conf[:app_name]}_#{ @timestamp }_db.sql"
end
def db_filename_tarred
@@ -171,14 +171,12 @@ def final_db_dump_path
end
def static_tar_path
- date_formatted = Time.now.strftime("%Y-%m-%d")
- f = "#{@fu_conf[:app_name]}_#{date_formatted}_static.tar"
+ f = "#{@fu_conf[:app_name]}_#{ @timestamp }_static.tar"
File.join(dump_base_path, f)
end
def final_static_dump_path
- date_formatted = Time.now.strftime("%Y-%m-%d")
- f = "#{@fu_conf[:app_name]}_#{date_formatted}_static.tar.gz"
+ f = "#{@fu_conf[:app_name]}_#{ @timestamp }_static.tar.gz"
File.join(dump_base_path, f)
end
@@ -197,6 +195,9 @@ def niceify(cmd)
cmd
end
end
+
+ def datetime_formatted
+ Time.now.strftime("%Y-%m-%d") + "_#{ Time.now.tv_sec }"
+ end
-
-end
+end

0 comments on commit f377f55

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