24.2. Before You Move

Take a moment to determine whether you find it quicker and easier to move your server, or instead to recreate a copy. To recreate a copy, install a new server, set up the new server configuration to match the old, and then copy only the data from the old server to the new server, initializing replication from existing data, or even from LDIF if your database is not too large.

After you decide to move a server, start by taking it out of service. Taking it out of service means directing client applications elsewhere, and then preventing updates from client applications, and finally disabling replication, too. Directing client applications elsewhere depends on your network configuration and possibly on your client application configuration. The other two steps can be completed with the dsconfig and dsreplication commands.

Procedure 24.1. To Take the Server Out of Service

  1. Direct client applications to other servers.

    How you do this depends on your network and client application configurations.

  2. Prevent the server from accepting updates from client applications.

    $ dsconfig
     set-global-configuration-prop
     --port 4444
     --hostname opendj2.example.com
     --bindDN "cn=Directory Manager"
     --bindPassword password
     --set writability-mode:internal-only
     --trustAll
     --no-prompt
  3. Disable replication for the server.

    $ dsreplication
     disable
     --disableAll
     --port 4444
     --hostname opendj2.example.com
     --adminUID admin
     --adminPassword password
     --trustAll
     --no-prompt
    Establishing connections ..... Done.
    Disabling replication on base DN dc=example,dc=com of server
     opendj2.example.com:4444 ..... Done.
    Disabling replication on base DN cn=admin data of server
     opendj2.example.com:4444 ..... Done.
    Disabling replication on base DN cn=schema of server
     opendj2.example.com:4444 ..... Done.
    Disabling replication port 8989 of server opendj2.example.com:4444 ..... Done.
    Removing registration information ..... Done.
    Removing truststore information ..... Done.
    
    See
    /var/.../opends-replication-3173475478874782719.log
    for a detailed log of this operation.
  4. With the server no longer receiving traffic or accepting updates from clients, and no longer replicating to other servers, you can shut it down in preparation for the move.

    $ stop-ds
    Stopping Server...
    
    ... msg=The Directory Server is now stopped
  5. You might also choose to remove extra log files from the server logs/ directory before moving the server.