Restore server issue

I am currently trying to migrate virtualmin to a new server, after which I will keep the current server as a live backup (which I intend to do with rsync and mysql replication)

The new server has been upgraded to Ubuntu 10.04 while the current one is still running 8.04 (will upgrade once it is the spare)

I have been running virtualmin scheduled full backups on a daily basis and am trying to setup the new server from those.

First import (about 17 domains) it all seemed to be running smoothly except it hit an error on "user already exists". This was a user for a domain which also features an alias and a sub domain. Before I started this was a fresh system so the user only existed since virtualmin made it, then crashed trying to make it again.

However the backup process DID restore all home directories, cron jobs, users, groups etc - but showed "no virtual servers" in the virtualmin dropdown box.

Since then I have tried some single domain backups, all of which have failed.

The 2 main errors have been "apache virtual server doesnt exist" and "bind domain doesnt exist"

Surely this shouldn't be a fatal error in a restore? The whole point of a restore is to recreate things which don't exist.

Here is the report from my last backup.

Restoring backup for virtual server xxxxxxxxxxxxxx.com .. Restoring virtual server password, quota and other details .. .. done Updating administration password and quotas .. .. done

Restoring Cron jobs .. .. done

Extracting TAR file of home directory .. .. done

Setting ownership of home directory .. .. done

Re-creating records in DNS domain .. .. domain not found!

.. failed! See the progress output above for the reason why.

Heres one with the apache error (Bind backup disabled) Extracting backup archive file .. .. done

Restoring backup for virtual server xxxxxxxx.com .. Restoring virtual server password, quota and other details .. .. done Updating administration password and quotas .. .. done

Restoring Cron jobs .. .. done

Restoring Apache virtual host configuration .. .. no Apache virtual host found!

.. failed! See the progress output above for the reason why.

And the username issue Extracting backup archive file .. .. done

Re-creating virtual server yyyyyyyy.com .. .. a clash was detected : A unix user named userrenamedforsecurity already exists

.. failed! See the progress output above for the reason why.

Status: 
Active

Comments

I have managed to start adding the domains again but there is definitely room for improvement in this matter. A lot of trial and error was involved, I had to delete home folders, delete users, awstats config etc. What eventually worked was when a restore got far enough to actually place the domain in the virtualserver list, then after doing a virtualmin delete my next restore worked.

I think my issues stemmed from having a primary virtual server ticked for backup along with its sub servers AND the "include sub servers in backup". This would explain the duplicate users.

My further issues were caused by all of the data reinstalled before restore hit an error. This error was on a single domain yet all of my servers failed to install.

My suggestions for improvement are as follows:- If a restore file hits an error, uninstall all data that was restored and move onto the next file. An option to overwrite data (users, email aliases etc) if they exist An option to create data if they don't exist (bind domain, apache etc)

These 3 settings would have saved a lot of time and effort and I am sure would be useful in a lot of restoration/migration cases.

Minor issues aside, well done to the developers for an extremely impressive system.