Backup impossible / Could not open settings file

Hello !
I am with YunoHost (stable).
I tried to update from Nextcloud 22.1.1~ynh1 to 22.2.0~ynh1 and it failed (log at

I see that this is linked to error in the Nextcloud backup process previous to the upgrade as I see
Error: Could not open settings file, reason: Expecting value: line 1 column 1 (char 0)

Indeed I have also an error if I want to do a simple backup with sudo BACKUP_CORE_ONLY=1 yunohost backup create
To be noticed during this full backup process:
Warning: /usr/share/yunohost/helpers.d/php: line 3: YNH_DEFAULT_PHP_VERSION: readonly variable

Do you know how I can investigate and make backup again with my Yunohost server?

Thanks in advance for your advices :pray:

Hmoké and I guess you reproduce the issue if you simply try to run

yunohost backup create --apps nextcloud


Yes of course, I reproduce the issue if I run the command yunohost backup create --apps nextcloud

But do you have any idea how can I solve this issue?

Yes I can if I can circumvent the problem to understand what’s causing the issue …

This sounds related to the file /etc/yunohost/settings.json being empty, possibly.

Does cat /etc/yunohost/settings.json displays anything?

Thanks @Aleks to look at my issue!

cat /etc/yunohost/settings.json displays nothing :frowning:

For your information, I had an issue with normal system upgrade because of sudden full root partition.
I deleted some “fat” logs (Nextcloud and Synapse mainly), and gained around 4-5 Gb and now my root partition is fine again (yunohost system diagnosis confirms everything is fine).
In Kimsufi debian install, root partition is not that big (18Gb) so I have to be careful.

After cleaning system log, system upgrade functions normally again.
But then I had Nextcloud that remained in maintenance mode after a failed upgrade (see [Nextcloud] A cloud for personal or group use - #419 by croulibri).
I solved that issue of maintenance mode (Nextcloud is online again), but upgrade of Nextcloud is still not possible because of failed backup process.

Could it be that my now solved situation of full root partition (only root was full, /home partition have more than 200Gb free) is the root of all these problems?

One day everything will be fine again :slight_smile:

Yes indeed, most likely it tried to write/update /etc/yunohost/settings.json, but because the partition was full, it couldn’t write the file, hence the empty file, which makes the code explode #ThugLife

Anyway, running echo '{}' > /etc/yunohost/settings.json should fix that issue (but in the process you lost any possible custom global setting you may have set, probably not a huge issue

Yes ! Thanks thanks thanks :bowing_man:
Once again, you made my day, @Aleks :v:

But for my information, what kind of custom global settings I may have lost?
I have mostly “tuned” my Yunohost server through webadmin and only the apps I installed have modified the system.

1 Like

Global settings include stuff like mail relay configuration, but are only available through the command line (for now) - so most likely you didn’t tweak any of those :+1:

Great, so very likely I haven’t lost anything.
I’ll have to monitor more closely the root partition before laughing a big upgrade :wink:
I had already once this issue (logs that full my root partition) with my debian desktop, but this was some years ago.
Hopefully I am safe for some years from now :slight_smile:

Have a good evening :wave:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.