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:
parent
1bc5173c78
commit
b1062284fd
2 changed files with 11 additions and 9 deletions
|
@ -33,7 +33,6 @@ domain=$(ynh_app_setting_get "$app" domain)
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
ynh_backup "$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE APP MAIN DIR
|
# BACKUP THE APP MAIN DIR
|
||||||
|
@ -42,5 +41,6 @@ ynh_backup "$final_path"
|
||||||
# Use gitlab-rake to backup
|
# Use gitlab-rake to backup
|
||||||
gitlab-rake gitlab:backup:create
|
gitlab-rake gitlab:backup:create
|
||||||
|
|
||||||
|
ynh_backup "/var/opt/$app/backups/"
|
||||||
ynh_backup "$config_path/gitlab-secrets.json"
|
ynh_backup "$config_path/gitlab-secrets.json"
|
||||||
ynh_backup "$config_path/gitlab.rb"
|
ynh_backup "$config_path/gitlab.rb"
|
||||||
|
|
|
@ -44,12 +44,6 @@ test ! -d $final_path \
|
||||||
|
|
||||||
ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE APP MAIN DIR
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_restore_file "$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -58,11 +52,19 @@ ynh_restore_file "$final_path"
|
||||||
|
|
||||||
ynh_install_app_dependencies openssh-server
|
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 unicorn
|
||||||
gitlab-ctl stop sidekiq
|
gitlab-ctl stop sidekiq
|
||||||
|
|
||||||
fullfile=$(ls /var/opt/gitlab/backups/*_gitlab* --file -c1 | head -1)
|
fullfile=$(ls /var/opt/$app/backups/*_gitlab* --file -c1 | head -1)
|
||||||
basename="/var/opt/gitlab/backups/"
|
basename="/var/opt/$app/backups/"
|
||||||
last_backup="${filename%_gitlab_backup.tar}"
|
last_backup="${filename%_gitlab_backup.tar}"
|
||||||
|
|
||||||
# Use gitlab-rake to backup
|
# Use gitlab-rake to backup
|
||||||
|
|
Loading…
Add table
Reference in a new issue