Account Move Observations

pfmartin

Well-Known Member
Aug 18, 2001
167
0
316
Earth
I am trying to move accounts from one server to another. My configuration is especially tricky because I have master/slave DNS set up across both servers. Here is what happens:

1. I copy an account from one server to another.
2. The account is copied over correctly and a new Ip is assigned.
3. The moment the account is created, the DNS entries for the account are set on the server which updates the other server with the new IP. This means that any subdoman information is overwritten. It also means that the copy is instantaneous. There is no opportunity to test because the domain DNS is now pointing at the new copy of the domain.
4. Realizing that the copy created an issue, I thought to delete the copied account (the copy of the original) and figure out what to do later. Of course, the DNS record was deleted on both servers at the end of this. So the domain is basically in limbo right now.

I realize that this is simply an issue of the sequence you go through. However, I thought I would mention it since it seems to be a little tricky thing that may affect others. I am also hoping I missed something that someone may help me with this.

Thanks
 

pfmartin

Well-Known Member
Aug 18, 2001
167
0
316
Earth
Some additional comments:

A. I think the account move is a tool that should be able to smoothly move accounts across servers when you need to. If we make the assumption that it will simply &work& without error, then the behavior I described above it fine. it actually means that you can move accounts around and that they are instantly accessible at their new IP because DNS kept up with the move. That is awesome.

B. However, in the case where you need to be &sure& it worked, it seems to be a little scary.

Anyhow, I hope that &A& above is the ultimate solution.
 

AlaskanWolf

Well-Known Member
Aug 11, 2001
535
0
316
Fremont CA
i wasnt aware that the move tool automatically changes the dns for any sites that you move with it...

When i been using it lately, i would have to manually update the dns on the &home& server so that the ip points to the new server....
 

pfmartin

Well-Known Member
Aug 18, 2001
167
0
316
Earth
The key thing about my setup is that one server serves as the master DNS server and the other as the slave DNS. So when the account is created/copied to one server, the DNS record it creates get's shared between both servers. At least that's the impression I had. I am going to do a little test and post my findings to explain how it actually works.

Be right back...
 

pfmartin

Well-Known Member
Aug 18, 2001
167
0
316
Earth
OK, I did the test. Here is what I did:

1. Created a new account on one server. For example's sake:
Domain: test.com
IP: 192.168.1.1

2. I checked everything to make sure that the IP resovled, etc. Looks at the /var/named/test.com.db file to check the IP. it was correct.
3. I went to the other server and selected &Copy account...&
4. Entered the FQDN and the root password.
5. It copied everything over.
6. I open the /var/named/test.com.db file and huala! The new IP was already in there. So it basically updates the IP in one go!

OK, so YES, it does do this for you autmatically.

Now, some other observations:

1. The test.com domain is still on the original server. If I delete the original account, it deletes the DNS record on both servers! This means the domain goes into limbo. That's the problem I was having before.

So I guess the key thing would be to backup the zone file before deleting the domain.

I think this is only a problem when, like me, you have 2 servers that are in a master/slave configuration.
 

pfmartin

Well-Known Member
Aug 18, 2001
167
0
316
Earth
Seems like their should be an option in the Account Termination page to NOT delete the DNS records for a domain. That would solve this (for me at least!)
 
B

bdraco

Guest
[quote:0e97fb7165][i:0e97fb7165]Originally posted by pfmartin[/i:0e97fb7165]

Seems like their should be an option in the Account Termination page to NOT delete the DNS records for a domain. That would solve this (for me at least!)[/quote:0e97fb7165]

How about a feature req ?
 

bert

Well-Known Member
Aug 21, 2001
593
0
316
When you move an account, the DNS record usually gets screwed up anyway. I rather have the move script not touch the DNS file at all. It is always better to change the DNS by hand, after all it does not take more than a minute or so. I also agree with the fact that there should be a feature that allows you to leave the DNS entry when terminating an account.

As of right now, what we do when moving accounts like that is we just create a copy of the /var/named/domain.com.db file and call it something like /var/named/domain.com.db.backup. Once we delete the account on the original server, we just go to WHM, recreate the DNS zone with the IP and then go and overwrite the new DNS file with the old *.backup file. This will take care of putting the right entries for subdomains or other records again. Then just run ndc reload from the shell and that's it.