Hi,
When trying to restore a virtual server we are moving from one server to another only the front end server is changing the EXTERNAL DB server is not changing. When we backup the server even if we do NOT backup mysql databases when we goto restore on the new front end server webmin stops and says the DATABASE exists on the remote DB server and will not continue the restore. Even if we DESELECT mysql from the restore all features it does not matter.
Is there a workaround to this bug. The only solution right now is to rename or delete the DB on the database server and restore from mysqldump which we do NOT want to do.
Thank You,
Eric
Sorry I forgot to add presently running 7.0 Virtualmin on the new server.
Which command or page in the UI are you using to backup and restore the virtual server on the new system?
Also, are you deleting it from the old system?
On current older server Using the backup virtual servers select one server via FTP it to new system this goes fine even deselecting mysql dbsOn new systemRestore virtual server from that archive file even if manually select features to restore minus mysqlError comes up because database is still on external db serverI have new server and old server have DB server as external servers If I delete the database from DB it will restore fineNo i dont want to delete off old server yet If the DB is a local DB all is fineIt just seems virtualmin doesn't realize u just want to restore a virtual server but DB should be ignored as it is on a external server not being changedThanks!!
When you're restoring on the remote system, try doing it via SSH with the command :
virtualmin restore-domain --source /path/to/backup.tar.gz --all-domains --all-features --replicationThe
--replicationflag is what you want to ignore the existing MySQL DB ..Hi Jamie,
Thank you for your reply I just tried this
virtualmin restore-domain --source /xxxx.com.tar.gz --all-domains --all-features --replication
Checking for missing features ..
.. all features in backup are supported
Checking for errors in backup ..
.. no errors found
Starting restore..
Extracting backup archive file ..
.. done
Re-creating virtual server XXXX.com ..
.. the following warnings were detected :
Restore failed!
Do I need to skip warnings also?
Thanks
Actually it looks like we don't properly support this use case yet :-( I'll do some work on it, and update this ticket with progress...
A possible work around instead of deleting the data off DB server.
What if on old server we DEASSOCIATE MySQL for that virtual server
Backup virtual server on OLD server
Restore virtual server on NEW server
This will then restore without Virtualmin knowing about MySQL.
How do I RE-ASSOCIATE the MySQL for that virtual server on the NEW server.?
Thanks
Eric
Yeah, you can do this shell commands
virtualmin disable-feature --domain example.com --mysql --disassociateandvirtualmin enable-feature --domain example.com --mysql --associateThank you will the associate prompt for credentials and db details ?Since this is known already and DB exists on remote DBThanks
It should keep the existing credentials. But test this on a test domain first, just to be sure!
OK thank you but I am not sure how when restoring on a new server it would know this db stuff is this stored elsewhere in virtualmin.When you import virtual u specify the mysql DB and details etcThanks
The details of the DB should be stored in Virtualmin's domain config file, which will be copied across as part of the restore.
Thanks again for the help. The de-associate and re-associate as a great workaround to not having to remove the DB from the external servers.
Thank You!
Great! Long-term we'll come up with a better solution to this, as it's a pretty common use-case.
Ok, in the next Virtualmin release (7.4), this will no longer be an issue when restoring in "replication" mode.