diff --git a/scripts/backup b/scripts/backup index 0856374..cf5e5c5 100755 --- a/scripts/backup +++ b/scripts/backup @@ -62,6 +62,10 @@ ynh_backup --src_path="/etc/cron.d/$app" ynh_backup --src_path="/etc/$app/" +# For apps with huge logs, you might want to pass --is_big, +# and in restore script, mkdir and pass --not_mandatory to ynh_restore_file. +ynh_backup --src_path="/var/log/$app/" + #================================================= # BACKUP THE MYSQL DATABASE #================================================= diff --git a/scripts/restore b/scripts/restore index e2a05fb..645e23d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -68,6 +68,16 @@ ynh_systemd_action --action=restart --service_name=fail2ban ynh_restore_file --origin_path="/etc/cron.d/$app" ynh_restore_file --origin_path="/etc/$app/" +# For apps with huge logs, you might want to not backup logs every time: +# The mkdir call is just here in case the log directory was not backed up. +# mkdir -p "/var/log/$app" +# chown $app:www-data "/var/log/$app" +# ynh_restore_file --src_path="/var/log/$app/" --not_mandatory +# +# For other apps, the simple way is better: +ynh_restore_file --origin_path="/var/log/$app/" + + #================================================= # RESTORE THE MYSQL DATABASE #=================================================