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

backup & restore logs

This commit is contained in:
OniriCorpe 2024-03-21 01:33:42 +01:00
parent 17e2d142dd
commit 7b0783fd75
2 changed files with 21 additions and 9 deletions

View file

@ -33,6 +33,14 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# BACKUP LOGS
#=================================================
ynh_backup --src_path="/var/log/nginx/$domain-access.log"
ynh_backup --src_path="/var/log/freshrss/freshrss.log"
#=================================================
# SPECIFIC BACKUP
#=================================================

View file

@ -36,6 +36,19 @@ ynh_script_progression --message="Restoring system configurations related to $ap
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE LOGS
#=================================================
ynh_script_progression --message="Restoring the log files..." --weight=1
ynh_backup --origin_path="/var/log/nginx/$domain-access.log"
log_path="/var/log/$app"
mkdir -p "$log_path"
chown "$app":www-data "$log_path"
ynh_backup --origin_path="$log_path/freshrss.log"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
@ -50,15 +63,6 @@ ynh_script_progression --message="Restoring the Cron configuration..." --weight=
ynh_restore_file --origin_path="/etc/cron.d/$app"
#=================================================
# RESTORE THE LOG FILES
#=================================================
ynh_script_progression --message="Restoring the log files..." --weight=1
log_path="/var/log/$app"
mkdir -p "$log_path"
chown "$app":www-data "$log_path"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================