I would have installed the new os then virtualmin then restored the domains from your backups via the gui rather than the cli. I have done this loads of times and it’s never failed with one exception if your db’s where mysql and you now have maria they are no longer fully compatible and the restore utility will actually fail but the gui will indicate success.
jimr1, thank you for your quick reply, but restoring is not the point (I too, made many restorations by the past using GUI, but using this time CLI restore for fastness and robustness). It went perfectly fine (CLI stating “no errors” and “restore succesfully completed”). The point is the backup behaviour : why some databases are missing and some not ? Is there a setting somewhere to secure that ? And last, why ALL the users settings are gone (need to manually recreate each database user to fix websites display) ?
As both cli and gui probably use the same code for restoring they will be as robust as each other. If you get a command line option wrong your restore may not be successful. That said the only problem I have ever had with a database restore is when the database to restore is incompatible with the database software installed.
Are you sure that
the backup data files is not corrupt
the database software is the same as when the backup was taken
But you say the domain user is not restored that points to a corrupt backup file
I see we are running in circle there. Maybe I do not express myself clearly. THERE IS NO CORRUPTION IN THE BACKUP FILE : Both GUI and CLI are saying everything went fine and no errors.
I will write this here again :
The point is the backup behaviour : why some databases are missing and some not ? Is there a setting somewhere to secure that ? And last, why ALL the users settings are gone (need to manually recreate each database user to fix websites display) ? Is there a setting somewhere to secure that too ?
All this I already have checked and NO, it is not present : that is why I opened this subject.
The main topic is why some are domains are backed up with their databases and some not since “all features / all domains /all virtualmin” are checked. After that, why databases users are all gone ?
For the benefit of others and my future self and hopefully you, I will document below my complete settings I have used for years using “Backup and Restore > Scheduled Backups”.
Destination and format - I use a local directory for quick individual virtual server restores and copy to the cloud for disaster recovery (See 4 below on that part).
Finally this includes mysql dbs as well as respective users and I confirm regularly that all restores as expected. If you have a similar setup (I use Almalinux 8.5) and experienced the issues you note then that would indicate an issue specific to your installation unfortunately.
Thank you very much for your time and precision. Unfortunately, that is exactly what I do, nevertheless, as I quoted many times, some databases (most of them) got restored and some not. The users are all gone and need to be recreated (frustrating, but easy in the case of WP config file). I think there might be another way to secure all that, before the backup maybe. I wonder if the way I create database is the right way : I go to Webmin and create one from scratch in Servers/MariaDB… Maybe should I create the database within the virtualhost (Virtulhost/Edit database) so that gets associated with it and then being taken in account by the backup. The question of the users remains without explanation to me.
normally I would get virtualmin to create the database on creation of the domain, see below … at least you know everything is correct (user name and permissions wise) and connected to the correct name. I never took into account that there may be an orphan database in the mix … this would explain why the database was not backed up.
in regards to orphan databases if that ends up being the root issue, somewhere I remember seeing a button — associate an existing DB with this virtual server
so – a DB created outside of Virtualmin can be ‘added’ (aka associated) to a specific Virtualmin virtual server so its ‘part of the family’
I am not sure at all about userids in that orphan DB – if they get discovered by Virtualmin as part of the association process or not.
That is precisely what I thought might be a solution. I’ll have to experiment another crash and backup issue to confirm that (or I can see what’s inside the tgz, like Jlmr1 noted four days ago). Remains the users issue.