Update 31.0.9 to 31.0.13 failed - impossible to login

First of all, if your log file is that large, it’s very likely that your log level is set too low (i.e. too verbose). For normal operation, you should set the log level to 2, and only lower it to 1 or 0 temporarily when you are actively experiencing problems with your Nextcloud instance that you need to investigate: https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/logging_configuration.html#log-levels

Secondly, you can and should rotate your logs automatically, for which there are several options:

  1. Nextcloud can rotate its own log file. However, as far as I know, it only keeps one rotated (old) log file. If you want to keep older logs, you would need to add some scripting yourself to automatically move or archive the rotated log file before it gets overwritten: Configuration Parameters — Nextcloud latest Administration Manual latest documentation

  2. You can configure Nextcloud to place log file outside of the Nextcloud data directory, e.g. in /var/log/nextcloud, and then use standard Linux tools such as logrotate to manage log rotation: Set the size of the logging file audit.log (log rotate) - #13 by ernolf

  3. Use journald or an external syslog server: Logging — Nextcloud latest Administration Manual latest documentation