Back docs > winnt > NT directory replication
     
   
   



Whats Needed:

- The Directory Replicator Service must be started on the Server or Computer
   that will be participating in replication.
- A domain user account must be created and added to the Backup Operators and
  Replicator groups on the server(s) or workstation(s) that will be participating in
  replication.
- SP3 or later (preferably SP4 or later). Prior to SP3, the Replicator service didn't
  work.

Replication allow you to export directories from one computer to another.
When using replication, you are either an Exporter or Importer. Typically,
replication is used to replicate Login Scripts and User Profiles from the PDC to BDCs in a domain.
If you do use login scripts and/or user profiles, and also use BDCs, then you have to have replication.
Without it, users getting authenticated on a BDC will not get their login script or profile.

Only NT Servers (PDCs, BDCs, Member Servers) can be Exporters, NT Servers and Workstations
can be Importers. (OS/2 Lan Manager can be an Importer too, if anyone is still using that…)

The file system of the Export computer must match the file system of the Import computer.
NTFS to NTFS, FAT to FAT.

Setting up Replication:

You start the Replication process by creating a user in the domain. Don't use Replicator as a name.
You need to add the user to the Backup Operators group on the export and import computers.
This has to be done whether the computer will be an Exporter or Importer. Give the user a
password that never expires and 24/7 access.

Next, open the Services applet in Control Panel and scroll down to Directory Replicator.
Click the Startup button, and choose Automatic, click the radio button next to "This Account",
and browse to the user you just created. Click OK and either
reboot the computer, or click the Start button to start the service.
Note: When you start the Directory Replicator service you should get a response
saying the user has been added to the Replicator group and assigned the Logon as a Service
right. Check to verify this, and if necessary, add the user to the Replicator group and give
the user the Logon as a Service right.

Configuring the Export Server:

The Export server will be the server that exports directories to Import servers.
Typically, the PDC in a domain is the Export server, and the domain's BDCs are the Import servers.
However, any NT server can be an Export server, and NT workstation as well as member servers
can be Importers.


By default, the directories that will be exported are placed in the
winnt\system32\repl\export directory. Only directories get exported.
If you put individual files in the ..\export directory, they will not be exported.
The exported directories, by default, will be sent to the
winnt\system32\repl\import directory on the Import servers.

Note: A NT server can be both an Import and Export server at the same time.


Configuring Directory Replication:

Export Servers:
Once you have placed your directories to be exported in the ..\export directory,
You need to tell NT whether it will Export, Import or both, and who to send the directories to.
This is done in Server Manager. Open Server Manager, choose the name of the Export server
from the list, and click on the Computer menu and then Properties.
Click the Replication button. If your server will be Exporting, choose the "Export Directories"
radio button and choose the path to your export directory. Leave the default path unless you
have set up a different export path.

Click the Add button at the bottom to choose which Domains or computers to export to.
Note: If you just want to export from your PDC to the BDCs in your Domain, which is typical,
then leave the "To List" blank. If you do add anything in the "To List", you will have to choose
a domain(s) or each computer you are exporting to.

If the computer you are configuring is the PDC, then click the radio button next to
"Import Directories". Leave the default path unless you changed it. By selecting the
Import Directories, your PDC will export to itself. The location it will export to will be
the winnt\system32\repl\import directory.
The winnt\system32\repl\import\scripts directory is the Netlogon share. This share
is where user's PCs will look for Login scripts and User Profiles.
By telling your PDC to Export and Import, you send the Login Script and User Profiles
to the BDCs and itself.

Note: Be sure to place your login script in the winnt\system32\repl\export\scripts
         directory.

Import Servers:
Once you have set up your PDC to export, go to each of your BDCs
(and/or any other NT computer you want to set up for replication import)
and go through the same process as above, except choose "Import Directories" only.
Leave the default path unless you changed it, and leave the "From List" blank if you
simply want to import from the PDC/Domain. If you want specific Domains or
computers to import from, then add them to the list.

Note: The user you add to the Backup Operators and Replicator groups should be
the same one used for the Export server. Open User Manager for Domains and locate
this user. Put this user in the Backup Operators local group. If you are using a user
from another domain, make sure the username and password are the same
as the export server.


What's the Manage button?

The manage button opens a dialog box that allows you to choose specific
subdirectories to export or import. You can also set locks on subdirectories
to prevent them from being exported. Wait until Stabilized tells NT to wait
2 minutes or more after any changes to the export directory before exporting.
By default NT sends changes immediately. You should check this box.
Checking the Entire Subtree box tell NT to send everything in the export directory.
If you uncheck this, only 1st level subdirectories are exported. Normally,
you would leave this box checked.

Things to consider:

- According to the MS KB article, Q139103, when exporting across a router or bridge
you should add the names of the Import computers in the To List in the Export Server's
configuration. The reason for this is that NT uses broadcasts for Directory Replication,
and if the name of the Import Servers are on the other side of a router
or bridge they might not receive the export broadcast. By specifically adding the
Import Server's name in the Export Server's To List, they will receive the broadcast.

- Leave the permissions for the Export directory alone. They are by default
Change to members of the Replicator group. If you change the permissions,
you will receive access denied error messages on your Import computers.

- By default the export server replicates every 5 minutes. However, if any
files have been changed, it waits 2 minutes before replicating.

- Your clocks on the computers participating in replication need to be synched.
If not, you will end up with replication errors.

- Errors for replication are entered in the Application log file. Use Event Viewer
to view this file.

- To receive alerts for the success or failure of directory replication, make sure
your Alerter Service is started.

- The Directory Replicator Service only replicates data - it doesn't synchronize
data. If you make changes to replicated data on an Import Server, it will not be
replicated back to the Export server. Only change data to be replicated on the Export Server.

- When you configure the import list for directory replication, you have the option
to add more than one domain to the From List. If each of these domains are
replicating to the same directory, such as the default
%SYSTEMROOT%\SYSTEM32\REPL\IMPORT\SCRIPTS directory,
only one of those domain's files are stored in the directory.
The server imports files from the first domain and then imports files
from the second domain. The files from the first domain will be deleted and
only the files from the Second domain will remain.

- Registry entries to control replication:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Replicator\Parameters

This key contains 2 values. The first is a value named Interval. Use this key to
set the time interval the export server replicates to import servers.
The data type is REG_DWORD, and it takes values from 1 to 60 minutes. The default is 5 minutes.

The 2nd value is GuardTime. This value tells the export server how long to wait
for stabilized files (unchanged files) before exporting.
It also uses REG_DWORD and the value is in minutes. It must be ½ of Interval or less.

    Top

b/johnson:01