Commit 2c8a46e0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix backup/restore path_to_repo

parent 891bc414
...@@ -134,7 +134,7 @@ namespace :gitlab do ...@@ -134,7 +134,7 @@ namespace :gitlab do
# Build a destination path for backup # Build a destination path for backup
path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle") path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle")
if Kernel.system("cd #{project.path_to_repo} > /dev/null 2>&1 && git bundle create #{path_to_bundle} --all > /dev/null 2>&1") if Kernel.system("cd #{project.repository.path_to_repo} > /dev/null 2>&1 && git bundle create #{path_to_bundle} --all > /dev/null 2>&1")
puts "[DONE]".green puts "[DONE]".green
else else
puts "[FAILED]".red puts "[FAILED]".red
...@@ -158,7 +158,7 @@ namespace :gitlab do ...@@ -158,7 +158,7 @@ namespace :gitlab do
# Build a backup path # Build a backup path
path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle") path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle")
if Kernel.system("git clone --bare #{path_to_bundle} #{project.path_to_repo} > /dev/null 2>&1") if Kernel.system("git clone --bare #{path_to_bundle} #{project.repository.path_to_repo} > /dev/null 2>&1")
puts "[DONE]".green puts "[DONE]".green
else else
puts "[FAILED]".red puts "[FAILED]".red
......
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