Commit 2c8a46e0fe0232e811e4bfbb0fa8d607298fdf10
1 parent
891bc414
Exists in
master
and in
4 other branches
Fix backup/restore path_to_repo
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/tasks/gitlab/backup.rake
@@ -134,7 +134,7 @@ namespace :gitlab do | @@ -134,7 +134,7 @@ namespace :gitlab do | ||
134 | # Build a destination path for backup | 134 | # Build a destination path for backup |
135 | path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle") | 135 | path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle") |
136 | 136 | ||
137 | - if Kernel.system("cd #{project.path_to_repo} > /dev/null 2>&1 && git bundle create #{path_to_bundle} --all > /dev/null 2>&1") | 137 | + if Kernel.system("cd #{project.repository.path_to_repo} > /dev/null 2>&1 && git bundle create #{path_to_bundle} --all > /dev/null 2>&1") |
138 | puts "[DONE]".green | 138 | puts "[DONE]".green |
139 | else | 139 | else |
140 | puts "[FAILED]".red | 140 | puts "[FAILED]".red |
@@ -158,7 +158,7 @@ namespace :gitlab do | @@ -158,7 +158,7 @@ namespace :gitlab do | ||
158 | # Build a backup path | 158 | # Build a backup path |
159 | path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle") | 159 | path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle") |
160 | 160 | ||
161 | - if Kernel.system("git clone --bare #{path_to_bundle} #{project.path_to_repo} > /dev/null 2>&1") | 161 | + if Kernel.system("git clone --bare #{path_to_bundle} #{project.repository.path_to_repo} > /dev/null 2>&1") |
162 | puts "[DONE]".green | 162 | puts "[DONE]".green |
163 | else | 163 | else |
164 | puts "[FAILED]".red | 164 | puts "[FAILED]".red |