Commit 10902c84 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

move old repositories dir to one with timestamp

parent cd6280f4
...@@ -29,7 +29,7 @@ module Backup ...@@ -29,7 +29,7 @@ module Backup
def restore def restore
if File.exists?(repos_path) if File.exists?(repos_path)
# Move repos dir to 'repositories.old' dir # 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) FileUtils.mv(repos_path, bk_repos_path)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment