Class StartDisasterRecoverySubCommand


  • public class StartDisasterRecoverySubCommand
    extends Object
    A dsrepl sub command that starts a disaster recovery.

    The goal of a disaster recovery is to reset all the data in the topology to a known, clean state. It consists in re-initializing all the replicas in the topology with the same data. This sub-command prepares the recovery but does not include the re-initialization of the data.

    The sub-command sends a task to the provided server to reset the generation ID to -1. The reset message is propagated automatically to all the servers of the topology.

    This has the effect to:

    • wipe out changelog data on all replication servers
    • suspend the replication because all replication servers of the topology will have a generation ID of -1, hence all directory servers of the topology will be put into a BAD_GEN_ID state.
    It will not prevent modifications in the directory servers of the topology: when a directory server is in BAD_GEN_ID state, its broker is still connected to a RS which will reject any change sent. So even if isolationPolicy configuration is equal to REJECT_ALL_UPDATES, this will not prevent modifications to be performed in the directory server because only the connectedness of the broker is checked. (@see LDAPReplicationDomain#cannotHandleOperationBecauseNoReplicationServer()).
    • Constructor Detail

      • StartDisasterRecoverySubCommand

        public StartDisasterRecoverySubCommand​(com.forgerock.opendj.cli.LdapClientProvider ldapClientProvider,
                                               Set<Dn> baseDns,
                                               com.forgerock.opendj.cli.Tool tool)
        Constructor for this sub-command.
        Parameters:
        ldapClientProvider - ldap client provider for the local server.
        baseDns - base Dns to process for resetting the generation ID.
        tool - this tool used to print messages
    • Method Detail

      • run

        public void run()
                 throws com.forgerock.opendj.cli.ClientException
        Throws:
        com.forgerock.opendj.cli.ClientException