From 3ddbb2f48352203a47c1d272df4d5cb1d2e7dacf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Tue, 25 Dec 2018 19:22:24 +0100 Subject: [PATCH] fix restore --- scripts/backup | 1 - scripts/restore | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/backup b/scripts/backup index a646fe1..917a9ef 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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" diff --git a/scripts/restore b/scripts/restore index 288ea0c..01c8b26 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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}"