On my Hansson-IT Nextcloud instance for example I get
{“reqId”:“tHeSrzd7GKmPkHP2a80F”,“level”:1,“time”:“2025-11-18T14:37:04+01:00”,“remoteAddr”:“”,“user”:“–”,“app”:“updater”,“method”:“”,“url”:“–”,“message”:“\OC\Updater::maintenanceEnabled: Turned on maintenance mode”,“userAgent”:“–”,“version”:“30.0.17.2”,“data”:{“app”:“updater”}}
as well as a “Turned off maintenance mode”, if I run the updater.
Maybe a cron job does similar with your system.
Hi… the maintenance log entries are fine, there is always an ON-OFF-pair as expected.. but
The backup seems to be the culprit here.
There is a log entry in the backup script log… enabling maintenance mode goes just fine, but switching it off fails:
02:05:48: Switching off maintenance mode...
In Config.php line 280:
/var/www/html/config/ does not have enough space for writing the config file! Not writing it back!
maintenance:mode [--on] [--off]
Apparently, the backup is so large that the disk runs out of space after the backup and causes this to fail.
Ok, the rason seems to be found now.
You will need to remove old files to get more free space, like old huge log files, replaced kernel and more or enlarge the partition mounted on “/”
Do you store the backups on your root-partition? - An external disk (frequently replaced by annother one) might be a better solution.
Other Suggestions:
“apt autoremove” removes old unused kernels and boot files.
If nextcloud log is set to debug (see “Administration settings” - “Logging” in the web interface), set the log-level to a higher one.
Check old backups in the nextcloud backup-folder f.ex. in /var/backups and remove the oldest ones.
Check and remove old snapshots, if enabled (see Ubuntu docs).
The backup location is only temporary. The backup files are moved off the machine immediately to a separate, larger disk anyways.
I will have do some reorganizing to avoid this situation in the future.
I used to keep two backups “just in case”, but I can change that to “only keep the latest” for now.
My last attempt to update the server os and switch to a more recent PHP version effed up the installation
So I already planned to set up a totally new server, probably using the AIO docker image this time. But since I never used Docker before, there is still some learning ahead of me
Yes, but in many cases the backup archive additional will be stored in /tmp folder while compressing.
An alternative may be, to create two smaller backups instead of one large one or write onto the external drive directly.
I found a script, which can send you an alert email, if disk runs out of space:
#!/bin/bash
# found on
# https://unix.stackexchange.com/questions/84334/shell-script-to-send-an-alert-mail-if-disk-usage-exceeds-90
# but structure modified and added a "quiet" alert to prevent from flooding mailbox
#
# receiver of the alert email:
ADMIN=recipient@mydomain.tld
# change value to your needs - here alert, if disk usage 95% or higher
ALERT=95
silent=0 # temporary variable
# getting drives/partitions
a=`df -Hl | grep -vE 'overlay |tmpfs|cdrom|Used' | awk '{ print $1 }'`
for i in $a;do
# get free space of partition in $i
usep=`df -Hl|grep $i|awk '{ print $5 }' | cut -d'%' -f1`
partition=$i
# if too less free space and /tmp/diskspace.txt does NOT exist send alert mail
if [ $usep -ge $ALERT ] && ! [ -a /tmp/diskspace.txt ]; then
echo "Alert: Almost out of disk space $usep"
df -Hl | mail -s "Alert: out of disk space $partition $usep%" $ADMIN
# set a flag in /tmp/ as alert-flag-file until used disk space is lower than $ALERT
echo alert > /tmp/diskspace.txt
silent=1 # still alert present
fi
# if disk-usage greater than alert-level and alert-flag-file exists set silent mode
if [ $usep -ge $ALERT ] && [ -a /tmp/diskspace.txt ]; then silent=1;fi
done
# if not "silent" anymore, remove alert-flag-file
if [ $silent -eq 0 ];then
rm /tmp/diskspace.txt
fi
The flag-file /tmp/diskspace.txt prevents from flooding your mailbox by alert emails and will be removed automatically, if disk-usage shrinks below the $ALERT - level.
The alert-mail must be sent, before disk-usage is 100%. Otherwise the mail program cannot create temporary mail file(s) and maillog-entries.
You may run it f.ex. every 3 minutes as a cron job. I use a similar script since 20 years on a linux server in a company, where i was the administrator until last year.
If you plan to handle your backup procedure after new installation in the same way as now, I recommend to attach an additional disk into your system as temporary storage for backup.