Do not download backup if exists
This commit is contained in:
parent
e6e8a95ca3
commit
2f5e02c90e
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,10 @@ namespace :dev do
|
|||
task :import_db do
|
||||
filename = "tps_prod_#{1.day.ago.strftime("%d-%m-%Y")}.sql"
|
||||
local_file = "/tmp/#{filename}"
|
||||
run_and_stop_if_error "scp -C deploy@sgmap_backup:/var/backup/production1/db/#{filename} #{local_file}"
|
||||
|
||||
if !File.exist?(local_file)
|
||||
run_and_stop_if_error "scp -C deploy@sgmap_backup:/var/backup/production1/db/#{filename} #{local_file}"
|
||||
end
|
||||
|
||||
dev_env_param = "RAILS_ENV=development"
|
||||
|
||||
|
|
Loading…
Reference in a new issue