Not able to backup Nextcloud before update

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.4
What app is this about: Nextcloud

Describe your issue

Hello.

Can anyone help me please with a Nextcloud update issue. I am trying to update from 30.0.9~ynh1 to 31.0.4~ynh2.

When it starts it fails at the backup and goes no further. I have disabled all of the Nextcloud apps but still not able to upgrade.

Log included here

Kind regards

dj

Share relevant logs or error messages

https://paste.yunohost.org/raw/deyuqusegu

Try this

sudo yunohost tools basic-space-cleanup

Then,

yunohost backup create --apps nextcloud && yunohost app upgrade nextcloud

Hi @JfmbLinux many thanks for your help and reply with this one…

When I run:

sudo yunohost tools basic-space-cleanup

Three files get removed

Then I ran:

yunohost backup create --apps nextcloud && yunohost app upgrade nextcloud

and I get…

Info: Collecting files to be backed up for nextcloud…
Info: Declaring files to be backed up...
Info: Backing up the MySQL database...
Info: Backup script completed for nextcloud. (YunoHost will then actually copy those files to the archive).
Info: Creating a backup archive from the collected files…
Info: The archive will contain about 41.4GB of data.
Success! Backup created: 20250427-180222
name: 20250427-180222
results:
apps:
nextcloud: Success
system:
size: 44416781223
Info: Now upgrading nextcloud…
Success! nextcloud is already up-to-date
Success! Upgrade complete
root@digitalcarnage:~#

There is now a backup of the Nextcloud instance. but the version has remained the same:

However the nextcloud version has remained the same:…

…and in The System Updates, I am still getting the option to update this instance of Nextcloud,

I am also being asked to update the files that were cleaned out.

What did I do wrong?

All the very best

Dj

Hello,
The script expected to find the file /etc/fail2ban/jail.d/nextcloud__3.conf. Have you checked if it exists on your installation?

@otm33 You’ve caught me out there… I wouldn’t, right now know where to look and how to fix that one…

I’m brave but not that brave :smiling_face:

Seeing the log,

2025-04-25 12:54:44,182: DEBUG - + '[' '!' -e /etc/fail2ban/jail.d/nextcloud__3.conf ']'
2025-04-25 12:54:44,182: WARNING - File or folder '/etc/fail2ban/jail.d/nextcloud__3.conf' to be backed up does not exist
2025-04-25 12:54:44,184: DEBUG - + ynh_print_warn 'File or folder '\''/etc/fail2ban/jail.d/nextcloud__3.conf'\'' to be backed up does not exist'

… it may be enough to just create the file,

$ sudo touch  /etc/fail2ban/jail.d/nextcloud__3.conf

After the upgrade the diagnosis might complain about an unexpected configuration, but that’s a problem for another day :wink:

and/or edit (sudo nano /etc/fail2ban/jail.d/nextcloud__3.conf) with something like

[nextcloud]
enabled = true
port = http,https
filter = nextcloud
logpath = /var/log/nextcloud/nextcloud.log
maxretry = 5

And check if filter is present : ls /etc/fail2ban/filter.d/nextcloud.conf

Hello @otm33 Thanks for your help with this.

Grrrr..! no joy sadly. As soon as I try the upgrade it fails with the follwoing log:

https://paste.yunohost.org/raw/uterimofuw

Any more ideas I could try?

Hi @deljones
As I said the filter file is not present. You can create it with these parameters

sudo nano /etc/fail2ban/filter.d/nextcloud__3.conf

“Were /etc/fail2ban/jail.d/nextcloud__3.conf and /etc/fail2ban/filter.d/nextcloud__3.conf among those files?”

hello @otm33 My data is backed up, so I took the dive and deleted the broken version, reinstalled a new one and restored the data. All good again.

I am curious though, I have three Nexcloud instances on my server that all get updated at the same time. On this occassion though only two updated… Odd. Oh well I guess its just a 1 or 0 going in the wrong place…

Many thanks though for all of your help. I appreciate it

Dj