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-24 19:31:51 +01:00
parent 1bc5173c78
commit b1062284fd
2 changed files with 11 additions and 9 deletions

View file

@ -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"

View file

@ -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