Unable to backup or upgrade NodeBB

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.17
What app is this about: NodeBB

Describe your issue

I think I installed one of the first releases of NodeBB 4 available here and all worked well. However, since then I have been unable to perform a backup and more important I also can’t do an upgrade as it needs to run a backup first.
I’m on 4.0.2 and the current version 4.4.3

Share relevant logs or error messages

When I try a backup
File or folder ‘/etc/logrotate.d/nodebb’ to be backed up does not exist
Same when I try an upgrade

It’s strange that it disappeared…
If I were you, I would try to recreate it manually -with root permissions — its content is standard and can be found here."

/var/log/nodebb/*.log {
    # Rotate if the logfile exceeds 100Mo
    size 100M
    # Keep 12 old log maximum
    rotate 12
    # Compress the logs with gzip
    compress
    # Compress the log at the next cycle. So keep always 2 non compressed logs
    delaycompress
    # Copy and truncate the log to allow to continue write on it. Instead of moving the log.
    copytruncate
    # Do not trigger an error if the log is missing
    missingok
    # Do not rotate if the log is empty
    notifempty
    # Keep old logs in the same dir
    noolddir
}


I replaced the file contents as you said above. I was then able to create a backup. Thank you

I tried an upgrade and it all fell apart, it also entirely failed to retore the backup it too and left me with a dead application. Eek.

Luckily the manual backup I managed to grab was able to restore.

The upgrade failed with:

Could not upgrade nodebb: An error occurred inside the app upgrade script

It then attempted an auto recovery from backup and failed too.

I have two logs:

The one trying to upgrade: https://paste.yunohost.org/raw/igawixehav
The one trying to recover: https://paste.yunohost.org/raw/juxuzasuni

Hopefully they will be of some use

There are multiple warnings about deprecated packages. The upgrade from 4.0 to 4.4 seems complicated.
Can you share /var/www/nodebb/.npm/_logs/2025-06-16T20_30_56_883Z-debug-0.log?

Doesn’t exist! I wonder if it is because I restored the backup I took.
Will I try another update and grab that log file?

Yes, if the restoration failed, you might as well try the upgrade again.

Log file of failed upgrade: hastebin

Could your server run out of memory journalctl -k | grep -i oom or out of space df -h?
The upgrade script fails at the very end and its log mentions a timeout :

job for nodebb.service failed because a timeout was exceeded.

It’s not running out of resources. (memory or disk space). I watched the availability during the upgrade a memory, and disk space is fine.

I then built a brand VPS server, restored, and upgraded. Same issue. I build a larger VPS and the restore and upgrade then worked.

It seems to be a time out issues for a less powerful server. During the final part of the upgrade it runs several npm install commands. These take a long time – over a minute.
Is there any way to increase the timeout of the upgrade script?

This is not the timeout of the script:

2025-06-16 20:30:56,691: DEBUG - + systemctl start nodebb
2025-06-16 20:32:40,134: WARNING - Job for nodebb.service failed because a timeout was exceeded.

You can try increasing nodebb service start timeout.

systemctl edit nodebb.service

Then add (where indicated in the file)

[Service]
TimeoutStartSec=300

And finally

sudo systemctl daemon-reload
systemctl restart nodebb.service

Hope it helps to upgrade or gives more details about the failure.

1 Like

Increasing the Timeout work, and the upgrade was able to complete to the end without any script errors.
However, nodebb itself was complaining when I then visited the web page
Blue screen, with:

500
Internal Server Error
Failed to lookup view! Did you run ./nodebb build?

in terminal, I did the following:

sudo yunohost app shell nodebb
and ./nodebb build

Nodebb now loads :+1: