diff --git a/scripts/backup b/scripts/backup index 0138445..4bf0f17 100755 --- a/scripts/backup +++ b/scripts/backup @@ -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 #================================================= diff --git a/scripts/restore b/scripts/restore index f9759a3..be31022 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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 #=================================================