Virtualmin Backup/MySQL DB error.

Using Scientific Linux 6.1, Virtualmin Pro.

This requires a specific set of circumstances, which of course I have. Follow this:

  1. Create a domain, sample.com
  2. Create a subdomain, dev.sample.com, same settings (mysql database included)
  3. Move the SQL db from dev to the main account, using the manage DB in Virtualmin.
  4. Backup dev. It backs up the DB that doesn't belong to it. As though I never moved it.
  5. Restore dev, it fails, the DB exists.
Status: 
Active

Comments

How exactly did you perform step 3 ? If it was by changing the user who owns the DB in the MySQL Database module, this may produce the issue you saw.

The recommended way is to disconnect the DB from the domain on the Edit Databases page, and then import it to the new domain.

Exactly.

from the virtualmin - edit databases menu. disassociate it.

Change to other domain, then import it there.

Now when I go to the virtualmin - edit databases, the database is gone, but the backup still finds it and trys to restore it.

OK, that should work.

Was the database the only one for the domain?

Yep. It was the one setup by the initial "subdomain" setup. There isn't one attached to that subdomain any longer.

I did some tests, but was not able to re-produce this problem ..

The only case I can see it happening is if the backup was done before dis-associating the database. That would produce the exact failure you saw..