Commit 10902c844fe834399e9b909b75ab3ea502c64a89
1 parent
cd6280f4
Exists in
master
and in
4 other branches
move old repositories dir to one with timestamp
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/backup/repository.rb
@@ -29,7 +29,7 @@ module Backup | @@ -29,7 +29,7 @@ module Backup | ||
29 | def restore | 29 | def restore |
30 | if File.exists?(repos_path) | 30 | if File.exists?(repos_path) |
31 | # Move repos dir to 'repositories.old' dir | 31 | # Move repos dir to 'repositories.old' dir |
32 | - bk_repos_path = File.join(repos_path, '..', 'repositories.old') | 32 | + bk_repos_path = File.join(repos_path, '..', 'repositories.old.' + Time.now.to_i.to_s) |
33 | FileUtils.mv(repos_path, bk_repos_path) | 33 | FileUtils.mv(repos_path, bk_repos_path) |
34 | end | 34 | end |
35 | 35 |