The JupyterHub database exclusively stores information about:
user names, group membership, and permissions
That’s it. Nothing about user preferences or directories live there.
Completely losing the hub database, generally has the consequences:
losing any runtime changes to users (e.g. users and groups changed via the admin panel)
invalidating all user sessions, forcing relogin
invalidating all API tokens (if any tokens are issued manually, they will need to be replaced)
losing track of running servers, forcing manual cleanup of running user pods, if any (user volumes should not be affected).
So assuming you don’t manually add/remove/edit users and all servers are stopped, for most JupyterHub deployments there are approximately no user-visible consequences of completely erasing the JupyterHub database and starting fresh other than needing to login again.
yes, this is only the hub state, it is not involved in any user sessions.
No, it is only the hub’s internal state. Nothing related to jupyterlab or anything running in the single-user session is in the database. That would all be in the user’s persisted home directory volume.
Not generally. There may be a database schema upgrade when there is a major jupyterhub version bump, but that’s it.
sqlite-pvc is usually fine. ‘real’ databases provide nicer backups and monitoring, but jupyterhub’s db use isn’t particularly intense.
That would be sensible if you want to make extra sure things don’t get lost, but unlikely to come up. In most cases, when you delete the pvc it’s because you are uninstalling jupyterhub. See above for the consequences of losing the hub database, which isn’t usually a big deal.