Describe the bug
The command used in the nextcloud.sh to delete the Redis keys from nextcloud return an error.
How to reproduce Reproduce
Steps to reproduce the behavior please explain how to reproduce the bug:
docker exec -it $(docker ps -f name=redis-mailcow -q) /bin/sh -c 'redis-cli KEYS "*nextcloud*" | xargs redis-cli DEL'(error) ERR wrong number of arguments for 'del' commandExpected behavior
The command should delete all the data from Redis related to nextcloud
System
Thanks, will try to fix that asap.
But... are there any "nextcloud" keys in the database? The error will also appear when there are no keys in the Redis database.
I just checked and there are no keys named "nextcloud" they all have a name with a random number at the begging like this one:
"3326) "a3668cdd0c6904c1def0e53585ee9dcc/imagePath-fabc87e239c56532ea819c228014e1db-ransomware_detection-app-dark.svg""
I just did a redis-cli INFO keyspace and saw that there is only one database in redis:
# Keyspace
db0:keys=5697,expires=1552,avg_ttl=1411300535
Strange. Why did I assume it was "nextcloud"?
We could use a dedicated Redis DB.
I have no idea, I just found this command in the nextcloud.sh. But how can I get rid of all those nextcloud related keys without deleting the Mailcow keys? I think moving forward using a sperate Redis DB would be awesome.
Don't know about identifying the keys. But I will add the change for a dedicated NC db soon.
Fixed in 3fad851278a44754b3a31042bacf03cb517da737 thanks @andryyy
Thanks for the reference :)