Virtualmin developers,
This might be a missconfig, but might be a bug too - in latest VM 3.65 GPL.
I am in the process of migrating my dedicated server to another one. So for first time, I decided to use VM gpl backup (so far I was using my own custom one).
I was running some pretty old VM gpl (didn’t notice what version), but all functions I needed were running just fine.
When I backed up for first time yesterday, I got no error messages.
The I successfully restored on the new server (VM 3.65 gpl).
Then I checked - all seemed to be fine except for the MYSQL database part of that virt.server. It was not there at all.
I thought might be my VM on the old server is too old and it doesn’t backup MYSQL at all.
So I read a lot, but since there is no clear instructions (step by step) how to upgrade VM gpl from old to latest version, I installed VM 3.65 gpl over the old version on the old server.
I backed up again - the same issue.
Maybe a config settting somewhere, but I couldn’t find it (and I don’t expect to have a problem considering the automated VM install via the Webmin admin).
So I dove deep into the code and found that in …/virtual-server/feature-mysql.pl, sub backup_mysql(), you are using two "techniques" to match which databases belong to the virt.server being backed up:
#1: Not sure what exactly is this "Wildcard for additional allowed MySQL databases":
[code:1]local $wild = &substitute_domain_template($tmpl->{‘mysql_wild’}, $[0]);
if ($wild) {
$wild =~ s/%/.*/g;
$wild =~ s//./g;
@dbs = grep { /^$wild$/i } @alldbs;
}[/code:1]
#2: [code:1]push(@dbs, split(/\s+/, $_[0]->{‘db_mysql’}));[/code:1]
In my case, I don’t have #1, and in #2, $_[0]->{‘db_mysql’} is empty, so that is no MYSQL database gets backed up.
I am not sure exactly how $_[0]->{‘db_mysql’} is formed. Are you actually reading the “db” table in “mysql” database to obtain which database belongs to the virt.server account?
Because that is the best way to get the correct list of databases.
Post edited by: kvguser, at: 2009/02/17 01:21
Post edited by: kvguser, at: 2009/02/17 01:38<br><br>Post edited by: kvguser, at: 2009/02/17 01:39