Skip to main content

Administrating MarkLogic Server

Backing Up and Restoring a Database Following Local Disk Failover

Following a failure of a host that contains a master forest configured for local disk failover, the database attached to the master forest fails over to the replica forest. This section describes how to back up the surviving replica forest data and restore the data after the host containing the master forest has been restored. In the example procedure described in this section, the Documents database is attached to the Documents-master forest on one host and is configured for local-disk failover to the Documents-rep forest on another host.

For details on how to configure local disk failover, see the Configuring Local-Disk Failover for a Forest section in the Scalability, Availability, and Failover Guide.

The procedure in this section is based on this scenario:

  1. Before the failure, the Documents-master forest is in the open state and the Documents-rep forest is in the sync replicating state:

    Screenshot showing that before the failure, the Documents-master forest is in the open state and the Documents-rep forest is in the sync replicating state.
  2. A failure occurs on the host containing the Documents-master forest and the Documents database automatically fails over to the Documents-rep forest. The Documents-rep forest is now in the open state and servicing updates on behalf of the Documents database.

Note

The configuration of the Documents database remains unchanged from before the failover:

Screenshot showing the configuration of the Documents database remaining unchanged from before the failover.

To back up the Documents-rep forest, follow these steps:

Note

Both the backup and restore procedures must be done on the host that contains the Documents-rep forest.

  1. On the host machine that contains the Documents-rep forest, back up the Documents database. Leave Include Replica Forests set to true.

    Screenshot showing Leave Include Replica Forests set to true.
  2. Select only the Documents-rep forest for backup.

  3. Once the host containing the Documents-master forest is restored, the Documents-master forest becomes the replica forest and receives replicated updates from the Documents-rep forest.

Before you can restore data from the Documents-rep forest that you backed up after the failover, you must reconfigure local disk failover from the Documents-rep forest to the Documents-master forest, so that the Documents-master forest is the new replica forest:

  1. In the configuration page Documents-master forest, disable replication to Documents-rep forest.

    Screenshot showing replication disabled.
  2. Navigate to the Forests configuration page for the Documents database. Unattach the Documents-master forest and attach the Documents-rep forest.

    Screenshot showing the Forests configuration page.
  3. Navigate to the configuration page for the Documents-rep forest and select the Documents-master forest for local-disk failover.

  4. On the host containing the Documents-rep forest, confirm that the forest is in the open state and restore the Documents database from the backup taken after the failover.

  5. Make sure only the Documents-rep forest is selected for restoration.

  6. Once the Documents-rep forest is restored, the updates are replicated to the Documents-master forest.

    Screenshot showing that once the Documents-rep forest is restored, the updates are replicated to the Documents-master forest.