1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00

Backup + Restore logs

This commit is contained in:
Limezy 2021-11-11 10:17:59 +07:00
parent 430426bebf
commit 576e35139b
2 changed files with 13 additions and 6 deletions

View file

@ -62,12 +62,6 @@ ynh_backup --src_path="$datadir" --is_big
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#================================================= #=================================================
# BACKUP FAIL2BAN CONFIGURATION # BACKUP FAIL2BAN CONFIGURATION
#================================================= #=================================================
@ -83,6 +77,12 @@ ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
# BACKUP LOGS
#=================================================
ynh_backup --src_path="/var/log/$app/$app.log"
#================================================= #=================================================
# BACKUP SYSTEMD # BACKUP SYSTEMD
#================================================= #=================================================

View file

@ -109,6 +109,13 @@ ynh_script_progression --message="Restoring the logrotate configuration..." --ti
ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# RESTORE THE LOGS
#=================================================
ynh_script_progression --message="Restoring the logs..." --time --weight=1
ynh_restore_file --origin_path="/var/log/$app/$app.log"
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================