Commit 63c8fee90b7dcf9a7bfe05f018e2696c87597027

Authored by Gustavo Duarte
1 parent ad2afb90
Exists in master

Use a hardlink instead of copying the backup file

This saves disk space and time spent copying the file, since the backup file can be quite large.

Unfortunately, the restore process fails if the backup file is a symlink.
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
provision.sh
... ... @@ -146,7 +146,8 @@ if [[ -e $backup ]]; then
146 146 /etc/init.d/gitlab stop
147 147  
148 148 printf "Movendo backup para diretório correto"
149   - install -D -m 755 -o git -g git $backup /var/lib/gitlab/backups
  149 + chown git.git $backup
  150 + ln $backup /var/lib/gitlab/backups/
150 151 cd /usr/lib/gitlab
151 152 sudo -u git bundle exec rake gitlab:backup:restore RAILS_ENV=production force=yes
152 153 else
... ...