1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Improve backup process

This commit is contained in:
Kayou 2019-05-29 17:00:45 +02:00 committed by GitHub
parent 4013baabff
commit deeeaacb08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,11 +47,9 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_script_progression --message="Backuping of Gitlab..." --weight=9
# Use gitlab-rake to backup
gitlab-rake gitlab:backup:create > backup.log
# Searching in backup logs the name of the backup archive created
last_backup=$(grep _gitlab_backup.tar backup.log | cut -d' ' -f4)
mv "/var/opt/$app/backups/$last_backup" "/var/opt/$app/backups/last_gitlab_backup.tar"
# For the complete doc: https://docs.gitlab.com/ce/raketasks/backup_restore.html
# For the filename: https://docs.gitlab.com/ce/raketasks/backup_restore.html#backup-filename
gitlab-rake gitlab:backup:create BACKUP=last
ynh_backup --src_path="/var/opt/$app/backups/last_gitlab_backup.tar"