I want to share my experiences, might be usefull for others struggling with the same problems:
- user manager’s database path setting is NOT permanent: it doesn’t survive a reboot
- no external storage was working with user manager: neither microSD slot nor USB storage
- user manager’s database is an sqlite3 database, can be moved to another device by “copy-paste”. I used SCP to do so and a SD card reader attached to my PC. (Mikrotik seems not support direct file copy so need some magic in a way or in another)
- user manager’s database is not encrypted
- user manager’s database can be opened in bash with help of sqlite3 command
- too many sessions exist somehow at database level
So what helped me at the end was compacting the database. 133 MB sqlite3 database because a 111 KB big file what is fine even for the internal storage.
So the final solution was in my Ubuntu 18.04 LTS machine:
- First you have to download user-manager directory from the router
- install sqlite3 utility:
apt install sqlite3
- open user managers database:
sqlite3 sqldb
- truncate sessions table:
delete from session;
- compact the database:
VACUUM;
- press CTRL+D to exit from the sqlite3 utility
- Override original files on the router with the compacted ones
Comment:
I’m far dissatisfied with the external storage capability of my Mikrotik router. I would be happy if support would step in and help to debug as I read similar experiences on the internet from others too.
Useful links: