move old repositories dir to one with timestamp

This commit is contained in:
Dmitriy Zaporozhets 2013-04-05 19:48:56 +03:00
parent cd6280f4fe
commit 10902c844f

View file

@ -29,7 +29,7 @@ module Backup
def restore
if File.exists?(repos_path)
# Move repos dir to 'repositories.old' dir
bk_repos_path = File.join(repos_path, '..', 'repositories.old')
bk_repos_path = File.join(repos_path, '..', 'repositories.old.' + Time.now.to_i.to_s)
FileUtils.mv(repos_path, bk_repos_path)
end