Hi,
we experience some problems with syncing of Mail/Calendar-Items, Loops or whatever they might be and i am trying to determine the best way of resolving these issues and anything what might happen in the future.
Mobile-Device-Management
When i remove a Device in either the Web-UI or Admin-UI the Device wouldn't be listed in the Web-UI anymore but the Deviced ID is still listed in the Admin-UI without any other known facts.
Shouldn't those devices be removed from the Admin-UI aswell? I tried Refresh/Relog/Reboot in case of "Browser-Cache-Issues" :-).
Is there a way to completely remove a Device from the System so any lingering state would be removed/purged and on the next connection from the Device it would have to do an resync? Something alike z-push's
z-push-admin -a remove -d DEVICEID
I also used z-push-admin just to do some Maintenance like cleaning up old Devices from the Database with something like this
#Remove all devices which lastsync-date is older 60 days
z-push-admin -a lastsync --days-old 60 |head -n -1 |tail -n +6 |awk '{print $1}' |xargs -n 1 z-push-admin -a remove -d
- Is there any similiar command i could use to remove old Devices from the CLI? I couldn't find anything in
grommunio-admin
:P. I probably have to do somejq
-Magic on the Redis-Cache?
Redis-Cache
As i was trying to determine where to look i found the Redis-Cache for which i added a little function to my ENV just to get a quick overview - WIP...
# REDIS-CACHE Liste Grommunio-Sync
grommunio_sync_rediscache() {
for key in $(redis-cli KEYS 'grommunio-sync*'); do
type=$(redis-cli type "$key")
printf "%s\n" "$key $type"
if [[ "$type" = "hash" ]]; then
hashkeys=$(redis-cli hkeys "$key")
printf "\t%s\n" $hashkeys
fi
done
}
Is it safe to remove Devices from the cache?
Are their any states saved for the Devices in
/var/lib/gromox/user/N/N
i should be aware of?How should i interpret KEYS in grommunio-sync:loopdetection? Those will be removed automagicallly after they have been dealt with?
Could i just delete ALL Redis-Entries with something like
redis-cli $(redis-cli KEYS grommunio-sync*)
to remove all states so any Device would have to do a complete Resync?