diff --git a/scripts/backup b/scripts/backup index 60e2900..917a9ef 100644 --- a/scripts/backup +++ b/scripts/backup @@ -33,7 +33,6 @@ domain=$(ynh_app_setting_get "$app" domain) #================================================= ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_backup "$final_path" #================================================= # BACKUP THE APP MAIN DIR @@ -42,5 +41,6 @@ ynh_backup "$final_path" # Use gitlab-rake to backup gitlab-rake gitlab:backup:create +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 6e42948..ae77983 100644 --- a/scripts/restore +++ b/scripts/restore @@ -44,12 +44,6 @@ test ! -d $final_path \ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE APP MAIN DIR -#================================================= - -ynh_restore_file "$final_path" - #================================================= # SPECIFIC RESTORATION #================================================= @@ -58,11 +52,19 @@ ynh_restore_file "$final_path" ynh_install_app_dependencies openssh-server +#================================================= +# RESTORE THE APP MAIN DIR +#================================================= + +setup_source $architecture + +ynh_restore_file "$/var/opt/$app/backups/" + gitlab-ctl stop unicorn gitlab-ctl stop sidekiq -fullfile=$(ls /var/opt/gitlab/backups/*_gitlab* --file -c1 | head -1) -basename="/var/opt/gitlab/backups/" +fullfile=$(ls /var/opt/$app/backups/*_gitlab* --file -c1 | head -1) +basename="/var/opt/$app/backups/" last_backup="${filename%_gitlab_backup.tar}" # Use gitlab-rake to backup