1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

fix restore

This commit is contained in:
Pierre Bourré 2018-12-25 19:22:24 +01:00
parent 35bff9524e
commit 3ddbb2f483
2 changed files with 4 additions and 9 deletions

View file

@ -41,7 +41,6 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
# Use gitlab-rake to backup
gitlab-rake gitlab:backup:create
ynh_backup "$final_path"
ynh_backup "/var/opt/$app/backups/"
ynh_backup "$config_path/gitlab-secrets.json"
ynh_backup "$config_path/gitlab.rb"

View file

@ -11,6 +11,7 @@ source /usr/share/yunohost/helpers
# Load common variables and helpers
source ../settings/scripts/_common.sh
source ../settings/scripts/upgrade.d/upgrade.sh
#=================================================
# MANAGE SCRIPT FAILURE
@ -48,7 +49,9 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
# RESTORE THE APP MAIN DIR
#=================================================
ynh_restore_file "$final_path"
ynh_install_app_dependencies openssh-server
setup_source $architecture
ynh_restore_file "/var/opt/$app/backups/"
@ -58,13 +61,6 @@ ynh_restore_file "/var/opt/$app/backups/"
# REINSTALL DEPENDENCIES
#=================================================
ynh_install_app_dependencies openssh-server
ln -s /opt/gitlab/bin/gitlab-ctl /usr/bin/gitlab-ctl
ln -s /opt/gitlab/bin/gitlab-psql /usr/bin/gitlab-psql
ln -s /opt/gitlab/bin/gitlab-rails /usr/bin/gitlab-rails
ln -s /opt/gitlab/bin/gitlab-rake /usr/bin/gitlab-rake
fullfile=$(ls /var/opt/gitlab/backups/*_gitlab* --file -c1 | head -1)
basename="/var/opt/gitlab/backups/"
last_backup="${filename%_gitlab_backup.tar}"