diff --git a/scripts/backup b/scripts/backup index 917a9ef..a646fe1 100644 --- a/scripts/backup +++ b/scripts/backup @@ -41,6 +41,7 @@ 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 ae77983..296780f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -44,6 +44,14 @@ 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" + +ynh_restore_file "/var/opt/$app/backups/" + #================================================= # SPECIFIC RESTORATION #================================================= @@ -52,19 +60,16 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_install_app_dependencies openssh-server -#================================================= -# RESTORE THE APP MAIN DIR -#================================================= - -setup_source $architecture - -ynh_restore_file "$/var/opt/$app/backups/" +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 gitlab-ctl stop unicorn gitlab-ctl stop sidekiq -fullfile=$(ls /var/opt/$app/backups/*_gitlab* --file -c1 | head -1) -basename="/var/opt/$app/backups/" +fullfile=$(ls /var/opt/gitlab/backups/*_gitlab* --file -c1 | head -1) +basename="/var/opt/gitlab/backups/" last_backup="${filename%_gitlab_backup.tar}" # Use gitlab-rake to backup