Nextcloud Backup failure Solution

Started by hansdampf, July 19, 2024, 04:53:05 PM

Previous topic - Next topic
I encountered a constant communication failure in conjunction with the latest Nextcloud v29 and after fiddling some days i found a solution which made the service work.

Failures were like "Error while fetching filelist from Nextcloud '/.' path", "Cannot get real username", "cannot execute MKCOL"

So the first thing was the annoying "Setup Cache..." inside Nextcloud Administration...
I decided to install redis to get rid of that messages.
And finally this resulted in a working Backup!
But! again some strange things happened...
I installed the corresponding php83-pecl-redis Extension to access Redis,
configured redis to use socket,
secured redis with Auth-password (i am a bit paranoid).
To create the auth-password there are some tips around the world, but the only working password-creation which worked was:
openssl rand 60 | openssl base64 -A
Changed the corresponding files (config.php of Nectcloud) and redis.conf.
Most important step was adding user www (or www-data), depending of the used server.
Tested:
sudo -u www redis-cli -s /var/run/redis/redis.sock ping
(error) NOAUTH Authentication required.

again by passing the password:
sudo -u www redis-cli -s /var/run/redis/redis.sock -a openssl-created-password ping
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
PONG

At this moment the configuration of Nextcloud-Backup from OPNsense didnt throw out any more errors and its working as expected!
It "should" work without password, but in my case it didnt. Maybe its because of the redis.conf entry
"protected-mode yes" which i didnt want to change.
Hopefully that helps others to get it working!