Koozali.org: home of the SME Server

Primary Domain Controller: backup to BDC

Offline greg

  • ***
  • 51
  • +0/-0
Primary Domain Controller: backup to BDC
« on: June 22, 2006, 07:25:04 PM »
Hi all,

This topic have been discussed before at several occasions(see e.g. http://forums.contribs.org/index.php?topic=31678.0 ).

However, I'm not exactly sure how to setup such a solution.  I guess that something could be done with rsync...

Have anybody with success set up a backup DC, which basically is a functional clone of the PDC, and which can 'take over' (not necessarily automatically) in case of failiure of the main PDC?

Thanks for your time!

Cheers

/G

Offline tariqf

  • *****
  • 179
  • +0/-0
Primary Domain Controller: backup to BDC
« Reply #1 on: August 21, 2006, 10:07:17 AM »
I too am about to try and use rsync to create a bdc. Have you found how to do it?

Offline greg

  • ***
  • 51
  • +0/-0
Primary Domain Controller: backup to BDC
« Reply #2 on: August 21, 2006, 10:53:51 AM »
Hi,

Somewhat. I haven't tested it throughly yet.

But, I do, based on the 'Migrate Server Howto': http://mirror.contribs.org/smeserver/contribs//ptehvand/howtos/rsyncmigrate.html

Do the rsync using the following commands in a cron-script:

    *rsync -vP -z --delete -a -e "ssh -c blowfish" <oldserver>:<old directory> <new directory>

      A trailing "/" after the old directory is very important in some cases.

The directories needed for a bare metal migration are:

    * /home/e-smith/
    * /home/netlogon/
    * /etc/e-smith/templates-custom/
    * /etc/e-smith/templates-user-custom/
    * /etc/group
    * /etc/gshadow
    * /etc/passwd
    * /etc/shadow
    * /etc/smbpasswd
    * /etc/ssh/
    * /opt/
    * /var/lib/mysql/
    * /root/
    * *the ones with trailing "/" mean you need to have it in the rsync command at the <old directory> point /etc/sudoers (if you use sudo)

NOTE: Copy the root to another dir than the original target machine /root.
In case of failiure of the main PDC - do the following.

*  Copy the BU-root to the root dir of the backup-machine and watch out for the following:
    * Once you copy over the /root directory you may experience issues with your .ssh/known_hosts file not being compatable any more
    * Your network cards - and drivers - may not be the same in both servers - you may need to modify this at the admin console

Making the newly restored server Live

* At a root prompt type:

      /sbin/e-smith/signal-event post-upgrade

      then

      /sbin/e-smith/signal-event reboot

When the server comes back up it should be identical to the PDC.

The disadvantage of this method is that it does not take place automatically.

If anybody have additions to this - please give feedback..

Cheers


/G

Offline tariqf

  • *****
  • 179
  • +0/-0
Primary Domain Controller: backup to BDC
« Reply #3 on: August 26, 2006, 01:28:11 AM »
great thanks I'm going to test this method and put to use next week. I will post any updates anything usefull that I add.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Primary Domain Controller: backup to BDC
« Reply #4 on: August 26, 2006, 11:07:58 AM »
Quote from: "tariqf"
great thanks I'm going to test this method and put to use next week. I will post any updates anything usefull that I add.
Have you read this already: http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/samba-bdc.html?

I don't believe passwords and all account information is stored in the LDAP, so part the syncing of user accounts will have to be done using the rsync method.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)