Commit e2b815c0225af1f95fcf2edbb794798b09c9b653

Authored by David Silva
1 parent 330f5492
Exists in master

fix backup path

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
@@ -135,16 +135,16 @@ systemctl start gitlab @@ -135,16 +135,16 @@ systemctl start gitlab
135 135
136 ##### restore backup 136 ##### restore backup
137 137
138 -backup=$(echo *_backup.tar)  
139 -if [[ -e /vagrant/$backup ]]; then 138 +backup=$(echo /vagrant/*_backup.tar)
  139 +if [[ -e $backup ]]; then
140 printf "####################################################" 140 printf "####################################################"
141 printf "Restaurando backup" 141 printf "Restaurando backup"
142 systemctl stop gitlab 142 systemctl stop gitlab
143 sleep 3 143 sleep 3
144 printf "Movendo backup para diretório correto" 144 printf "Movendo backup para diretório correto"
145 - install -D -m 755 -o git -g git /vagrant/$backup /var/lib/gitlab/backups  
146 - ### O task do gitlab espera uma resposta via bash, não sei se tem como mandarmos essa resposta via bash.  
147 - # (cd /usr/lib/gitlab && sudo -u git bundle exec rake gitlab:backup:restore RAILS_ENV=production) 145 + install -D -m 755 -o git -g git $backup /var/lib/gitlab/backups
  146 + cd /usr/lib/gitlab
  147 + sudo -u yes | git bundle exec rake gitlab:backup:restore RAILS_ENV=production
148 else 148 else
149 printf "Backup não encontrado" 149 printf "Backup não encontrado"
150 fi 150 fi