7.12. Performing Database or OS Maintenance

When performing database or operating system maintenance, datasources should be temporarily disabled by placing them into the OFFLINE state. For maintenance operations on a Primary, the current Primary should be switched, the required maintenance steps performed, and then the Primary switched back.

To perform maintenance, you should ensure that your application is not using the host, perform the necessary maintenance, and then re-enable the access within your application.

The steps are:

  1. Put the replicator into the offline state to prevent replication and changes being extracted/applied from/to the database:

    shell> trepctl [-all-services] offline

    To perform operating system maintenance, including rebooting the system, the replicator can be stopped completely:

    shell> replicator stop
  2. Perform the required maintenance, including updating the operating system, software or hardware changes.

  3. If you have stopped the replicator, restart the service again, or simply put it back online if already running:

    shell> replicator start
    shell> trepctl [-all-services] online

Once the datasource is back online, monitor the status of the service and ensure that the replicator has started up and that transactions are being extracted or applied.