No DB users after restore from backup

SYSTEM INFORMATION
OS type and version Ubuntu 22.04.4
Virtualmin version 7.10.0

Virtualmin creates all databases after any backup restore, but all corresponding DB users are gone.
What do I do wrong?

Are you talking about the default domain users? Users created during app installs? Both?

I mean DB users that were created in the DB server.
Default domain users are restored successfully but users that were created manually for some app needs are lost after restore from back up on a new server.

There is now a pro feature where you can add additional DB user, I guess these would survive in the backup

Manually created DB users in Webmin might not get added to the backup.

Only Databases owned by the virtual server will be backed up.

I’ve wondered about setting up a cron to do a full dump just to make sure I have the full db. But, not a big concern for me.

How would that help restoring a user and password that is stored outside of the database ?

Aren’t the db users stored in the db?
I admit, db is my weak point.

Nope they are not

This is for postgres but I thought mariadb was the same?

postgres-# \du
                                    List of roles
  Role name  |                         Attributes                         | Member of 
-------------+------------------------------------------------------------+-----------
list     |                                                            | {}
crew        |                                                            | {}
tadmin | Password valid until 2038-01-01 00:00:00-05                | {}
ght       | Password valid until 2038-01-01 00:00:00-05                | {}
mit      | Superuser, Create role, Create DB                          | {}
man3    |                                                            | {}
man3web |                                                            | {}
lnet     | Password valid until 2038-01-01 00:00:00-05                | {}
lorg     |                                                            | {}
oc        |                                                            | {}
on        |                                                            | {}
oo        |                                                            | {}
toforge  |                                                            | {}
 postgres    | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
son70    |                                                            | {}

There is now a pro feature where you can add additional DB user, I guess these would survive in the backup

I am not sure what you mean because the possibility of adding additional DB users is available in the GPL version

Manually created DB users in Webmin might not get added to the backup.

And it is very strange IMHO.

I am not sure what you mean because the possibility of adding additional DB users is available in the GPL version

Where? This is the DB username section in Virtualmin

And it is very strange IMHO.

I would of preferred multiple DB users names in the GPL version but it is what it is. As mentioned you can do multiple users in Webmin but as pointed out they might not get stored in the virtualmin backup.

Where? This is the DB username section in Virtualmin

In the Webmin section.
Or do you mean that the new pro feature provides the possibility to do it in the DB username section in Virtualmin?

they might not get stored in the virtualmin backup

They DO NOT get stored in the Virtualmin backup. I can understand the logic behind why that happens, but it’s not what you’re considering when you want to do a backup of the database imho." It is not a big issue if you have a list of db users with their passwords but it needs time to restore it manually.

I think there is a real underlying issue here as now doing a virtual server transfer to a new server is no longer copying the additional users listed on the first server… For my situation, this is mostly database users.
I moved about 20 virtual servers a few weeks ago to this server and all additional users were copied. Now I’m trying to move those same virtual servers to new hardware and the additional users are not being created.

The copy seems to a create a new user with new password on the new server and that is all… No restoration of previous. Given the transfer is using the regular backup process, I think it must be related to above.

What this means is my WordPress sites which used to transfer seamlessly, can no longer access their databases as per their settings in wp-config.php.

I can’t find any errors in logs or any reference to the extra users.

OK - just to complicate matters further, if I do a manual backup and manually restore on the new server , it does successfully restore the additional users… that’s great… but annoying… I have 100+ virtual servers to move…

Another gotcha - even though the users are re-created, the secondary user can no longer access the database no matter what I do, so I’ve been forced to switch back to the primary… I’m wondering now if this is due to a (new) limitation of the GPL version?

I don’t think it is a new limitation but sounds more there might be a conflict/issue/bug with the code that handles the new database users.

FYI, it took me 2 full days to move and restore all these sites between the servers using manual backups transferred via rsync…
The missing db users still seemed to occur randomly and even worse on a couple of occasions the database was missing too… even though it’s in the tar file… very weird stuff…

And unrelated to this issue, on restoration, sometimes the PHP settings would come in a bit weird with ’ PHP service maximum sub-processes’ set to 9999 and the PHP logging disabled… and for whatever reason, that would take down PHP for all sites on the server so I had to madly scramble to correct the PHP settings on the batch of domains just imported. A tad annoying…

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.