Restore clash because of group

Hi

We used Virtualmin as a simple (thank you for that :slight_smile: tool to administrate our more or less 70 virtual hosts (mostly pro bono).
Currently I want to move from an old Suse 9.0 server to an actual machine with Suse 11.1.

My idea was that, once all the same webmin modules and other basics are installed, I can take the virtualmin per domain backups and restore them on the new (clean) machine. (I’m aware that there will be some afterwork for the few sites with scripts)

While this works perfect for the first tested domain, it has a clash complaining that the user and groups exits and the scrips stops for the following domain(s).

We set up the domains on the old server with the different users but all in the group wwwusers. So therefore it is obvious that this group exits after the first restored domain.

After severl hours of trial and error and having searched the forum and the documentation over here I’m asking myself whether my idea is wrong or there is another, better way to move these domains…

Any idea? what did I miss?

Thank you for your thoughts and ideas (or links :slight_smile:

Christoph

Howdy,

Just to help me wrap my head around the problem, can you post the specific error that you receive when you go to restore a domain?

Thanks,
-Eric

Hi Eric

Thank you for yout time.

It said:

Starting restore of 1 domains from local file /home/christoph/backups/amhof.biz.tar.gz …

Extracting backup archive file …
… done

Re-creating virtual server amhof.biz …
… a clash was detected : A unix user called amhof.biz or group called wwwusers already exists

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


Regards from Switzerland
Christoph

Okay, and just to clarify – you’re saying that wwwusers was the primary group, or a secondary group?

Or actually, is the Suse 9 server still online? Is there any way I could see a copy of the /etc/passwd and /etc/group files?

If so, you could email them to eric@virtualmin.com (and include a link to this forum thread in the message body) – I may be able to put together where the problem is from that. Thanks!
-Eric

Hi Christoph,

So do all of the domains have the same primary group name? I am surprised you could even set this up in Virtualmin, as it should prevent creation of multiple domains with the same group in the first place.

Hi Jamie

This has historic reasons, we have this server (respectively the predecessors) for more than ten years. We changed the group manually to wwwusers (which probably might be the problem now?) after set up by VM. A large part of the servers initially was set up by hand (before we had VM). We never reconsidered the allocation to groups as it worked for us (but it is never too late to learn :wink:

Christoph

Ok, I understand the situation now. The way to get out of this would be to do as follows :

  • For each backup tar.gz, extract it to a temporary directory with a command like :
    tar xvzf amhof.biz.tar.gz

  • Edit the amhof.biz_virtualmin file and change the group= line from wwwusers to something unique, like amhof.biz

  • Re-create the backup with a comment like :
    tar cvzf amhof.biz.tar.gz amhof.biz_*

Once this is done for all your domains, you can restore them using Virtualmin.

OK, thank you.
I’ll try it out at the end of the week and can give you further feedback then.

Christoph

OK, while restoring of servers out of backups now seems to work (apart from the MY-SQL Server (as we have only a few MySQL Dbs running I’ll dump and restore them there) where the script still complains) now Apache is on strike when starting it up:
Starting httpd2 (prefork) Syntax error on line 2 of /etc/apache2/vhosts.d/aa795.ch.conf:
Group cannot occur within <VirtualHost> section

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf

…failed

Seems that live is not that easy and that I’ll have to spend the easter holidays searching for bugs :slight_smile:

What’s on line 2 of “/etc/apache2/vhosts.d/aa795.ch.conf”?
-Eric

until now it was (first and second line):
<VirtualHost 192.168.1.15:80>
Group "#1004"

Googeling I realized that there is a change between the syntax in the Apache Version 1.3.28 on the old server and the 2.2.10 one on the new server.

I understood that (old):
User "aa795.ch"
Group "#1004"

Has become (new):
SuexecUserGroup aa795.ch 1004

At least when I change it to that there is no problem starting up the server. Let’s see what other relevant changes I will face…