Koozali.org: home of the SME Server

Move a domain to a new server

Offline kevinb

  • *
  • 237
  • +0/-0
Move a domain to a new server
« on: May 10, 2008, 09:16:10 PM »
Hello everyone,

We have two SME servers on our network. One is our file server and the other is our domain controller. We wish to move the domain controller functions to the file server and only have one SME server.

Any ideas how we can do this? Our goal is to not have to go to each client and restore every users profile (which appears to be the case if we have to take the client off the domain and then add it back on again).

If we recreate the users on the new domain controller and manage to migrate the clients over to the new domain controller ... will Windows recreate the users profile?

Would it be better to switch over to roaming profiles and then migrate the domain and the profiles? Is this possible?

Than you in advance for your help.

Kevin

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Move a domain to a new server
« Reply #1 on: May 11, 2008, 06:17:55 AM »
kevinb

This article is probably worth a read for background info re backup & restore.
http://wiki.contribs.org/Backup_server_config

You could do something like these steps, which assume the following. You may need to vary the procedure if your situation is different.
The same users are setup on both servers
The domain controller does not have much/any data in ibays, but probably has mail in user folders.
The file server is in server only mode & does not have user data or mysql data.
The domain controller is in gateway mode.
The appropriateness of doing some of the following may depend on whether you have customisations done to the file server, as effectively the file server config will be overwritten.

1 Backup the domain controller, and backup the file server

2 On the file server create /temp folder (don't use /tmp as stuff gets auto deleted from that).

3 On the file server move all ibay data to /temp

4 On the file server move all user data to /temp

5 On the files server move all mysql data from /var/lib/mysql to /temp or dump all mysql data to /temp

6 On the file server move any other data locations or customisations in /opt or in /etc/e-smith/templates-custom and so on to /temp

7 On the file server note all settings in server manager (in case any need to be recreated)   

8 On the file server note all settings in console "Configure this server" in case any need to be recreated)

9 On the file server in server manager delete all ibays and users & pseudonyms & domains etc etc.

10 On the file server remove any custom templates & do a signal-event post-upgrade followed by a reboot
 
11 The file server is now a fairly bog standard install of the OS without any configuration

12 Restore the backup of the domain controller to the file server. Obviously this will overwrite configuration on the file server. All user accounts and machine accounts, mysql data, user data etc will now be "restored" to the file server, which when rebooted will function like the domain controller did.

13 On the newly restored file server/now domain controller, recreate all required ibays in server manager.

14 Move all ibay data in /temp to the corresponding ibays.

15 You may need to also manually import any mysql data from the old file server, and user data too if there was any.

Make sure you do not inadvertantly change permissions and ownership when moving files around, preferably use tar and untar as mentioned in the Howto.
« Last Edit: May 11, 2008, 06:20:42 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Move a domain to a new server
« Reply #2 on: May 11, 2008, 06:44:18 AM »
Thanks for the input Mary,

I guess I should have given a little more detail .....

Our file server has actually been our development server. We have it heavily customized since our web people moved over and modified all their web scripts, etc. I would rather not have to risk setting all this back up. We have an internal email server so there are not any emails on the DC. I was hoping I could copy over some samba data/config files and have everything work just fine.

Any ideas anyone?

I know that when I changed the name of the DC I had to go and remove and add every client back onto the domain and recover everyones profiles .... I do not want to do that again.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Move a domain to a new server
« Reply #3 on: May 11, 2008, 07:13:12 AM »
kevinb

Quote
Our file server has actually been our development server. We have it heavily customized since our web people moved over and modified all their web scripts, etc. I would rather not have to risk setting all this back up.

Steps 5 & 6 cover this scenerio, although you may need to re-enter some mysql passwords.
"5 On the files server move all mysql data from /var/lib/mysql to /temp or dump all mysql data to /temp
6 On the file server move any other data locations or customisations in /opt or in /etc/e-smith/templates-custom and so on to /temp"

Web apps in ibays or opt get moved & put back, so no real problem there.


Quote
I was hoping I could copy over some samba data/config files and have everything work just fine.

That's possible but messy if you don't know what you are doing, and probably prone to error, as I believe many files will be involved. The user & machine data etc is spread across many db & config files. Someone else may be able to advise.

I would certainly do a test run first, to prove whichever way you choose to do it, is in fact workable.


Quote
I know that when I changed the name of the DC I had to go and remove and add every client back onto the domain and recover everyones profiles .... I do not want to do that again.

That why I suggested to backup & restore the DC.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Move a domain to a new server
« Reply #4 on: May 11, 2008, 07:23:28 AM »
Quote
I would certainly do a test run first, to prove whichever way you choose to do it, is in fact workable.

I am setting a VM network as tonight I type to do just this ... Thanks and I'll let you know how it turns out.