> For the complete documentation index, see [llms.txt](https://docs.zmanda.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zmanda.com/zmanda-classic/information/disaster-recovery/disaster-recovery-with-zmanda-a-comprehensive-guide.md).

# Disaster Recovery with Zmanda: A Comprehensive Guide

Disaster Recovery (DR) is a feature that allows you to protect your data from disasters. In the event of a disaster at your primary site, you can restore your data from the DR site and resume operations. Zmanda’s Disaster Recovery (DR) ensures continuous data protection by replicating the primary server's configuration to a secondary DR site. This redundant server acts as a fail-safe, allowing for rapid recovery in case of a disaster at the primary site.

This guide offers easy steps to configure DR ensuring constant data protection.

**Steps to configure Disaster Recovery (DR) in Zmanda:**

1. Download Disaster Recovery enabled license from [Network Zmanda](https://network.zmanda.com/login).
2. Configure DR Service in Zmanda Management Console (ZMC).

{% hint style="info" %}
**Note:** The DR repository is the location where your server configurations are stored and preserved.
{% endhint %}

**Step 1: Download Disaster Recovery enabled license from Network Zmanda**

The first step to configuring DR is to download a Disaster Recovery enabled license from [Network Zmanda](https://network.zmanda.com/). This license will enable the DR feature on your Zmanda server and allow you to configure a DR site.

To download a Disaster Recovery enabled license, follow these steps:

1. Log in to your account on [Network Zmanda](https://network.zmanda.com/).
2. Click the **Download License** button for the newly generated license.
3. You'll need to provide the MAC address for the primary instance.

{% hint style="info" %}
**Note:** For the disaster recovery instance, providing the MAC address is not initially required. However, when uploading the license on the Disaster Recovery instance, you will need to re-download the license after providing the Disaster Recovery instance MAC address.
{% endhint %}

4. Click **Next**, then copy the passkey and proceed to download the license.

<figure><img src="/files/H3w0R7UKeZ7MSYh9ZkzT" alt=""><figcaption></figcaption></figure>

**Step 2: Configure DR Service on ZMC**

To configure the DR Service on ZMC, follow these steps:

**Primary instance setup:**

After downloading the DR enabled license, you need to configure the DR service on your Zmanda server. This involves uploading the license and configuring the DR repository.

1. Log in to ZMC (Zmanda Management Console).
2. Navigate to the **License** tab.
3. Upload the Disaster Recovery enabled license and paste the associated passkey.
4. After successful license upload, the Disaster Recovery tab will be enabled under the **Settings** tab.
5. Click the **Disaster Recovery** tab.
6. Click the **Set up DR Repository** button and configure the storage details.

{% hint style="info" %}
**Essential storage details:**

1. **Name:** For DR Repository, the name is **pre-defined** and cannot be modified. This ensures clear identification within the system.

2. **Directory:** Specify the SMB storage directory path. It is **mandatory** in DR, and if left blank, the machine's home directory will be used as the default location. This path on SMB server configurations is synced every 1 hour for disaster recovery.

3. **SMB IP:** Enter the SMB server's IP address (format: four octets, each ranging from 0-255 each and containing only digits). An incorrect IP address will prompt an error indicating **Invalid Server IP**.

4. **SMB Port:** Specify the SMB Port number and validate it for accuracy. This field accepts only digits, up to five.

5. **SMB Share:** Enter the SMB storage share installed on the machine.

6. **Username:** Specify the username associated with the SMB storage.

7. **Password:** Provide the password corresponding to the SMB storage for authentication.

8. **Domain (Optional):** Specify the SMB server's domain name (defaults to WORKGROUP if left blank).

9. **Comments (optional):** Add any relevant notes for future reference.

10. **Advanced Options:** If the Advanced option is chosen, additional fields will appear. Fields like Output Buffer Size and Output Buffer Abbr are set to 2 MiB by default and are not editable.
    {% endhint %}

11. The Disaster Recovery (DR) service starts synchronizing the configuration data for your primary instance once every hour following successful setting of the storage details.

{% hint style="info" %}
**Note:**

* After activation, users must be on their primary instance in order to do ordinary operations like creating storages, backup sets, sources, etc.
* There is a single active instance at any given time, your primary instance is the active server until a disaster occurs. In the event of a disaster, the DR instance is activated to restore operations and safeguard your data.
* Ensure to safeguard a copy of the **DRconfig** as it will be necessary for configuring your DR instance.
  {% endhint %}

<figure><img src="/files/86fPXcX9Zwqicn38jZE2" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qMxajMbis85MlH6FDsEL" alt=""><figcaption></figcaption></figure>

After installing the binary on the Disaster Recovery instance, follow these steps:

**Disaster Recovery instance setup:**

After configuring the DR service on your primary instance, you need to set up the Disaster Recovery instance. This involves copying the DR configuration file from the Primary instance to the Disaster Recovery instance and uploading the license.

To set up the Disaster Recovery Instance, follow these steps:

1. After installing the binary on the Disaster Recovery server copy **drconfig** file from **/var/lib/amanda/drservice** folder, from the primary instance to the disaster recovery instance.
2. Copy the **drconfig** file to **/var/lib/amanda/drservice** and change the ownership and permission of the file by following these commands:

Copy DR configuration file:

```
cp /<path-to>/drconfig /var/lib/amanda/drservice/ && chown amandabackup: /var/lib/amanda/drservice/drconfig && chmod 644 /var/lib/amanda/drservice/drconfig
```

Import DR configuration:

```
/opt/zmanda/amanda/bin/drservice import --source /var/lib/amanda/drservice/drconfig
```

3. Log in to Network Zmanda and provide the DR server MAC address if it is required.
4. Re-download the license and copy the new passkey.
5. Log in to ZMC and navigate to the **License** tab under **Settings**.
6. Upload the license (containing both Primary Instance MAC address and Disaster Recovery server’s MAC address) and paste the passkey for that license.
7. After successful license upload, the Disaster Recovery tab will be enabled under the **Settings** tab.
8. On the **Disaster Recovery (DR)** page, you will find pre-populated details for the DR repository.
9. On the Disaster Recovery Instance, toggle the **Activate DR Sync** button to commence the restore operation.

{% hint style="info" %}
**Note:**

* On the Disaster Recovery Instance server, during the restore process, no other operations such as creating a server, creating a storage, defining a backup set, etc., will be permitted until the restore is successfully completed. This ensures a focused and uninterrupted restoration procedure.
* To ensure continuous backups and restores, all agents and workloads must be registered with the DR instance.
  {% endhint %}

<figure><img src="/files/VoYrorUUkNzlvbqsTXtK" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/VOi1W3DemuWx8SM1ckIk" alt=""><figcaption></figcaption></figure>

**Restoring Data from the DR Site:**

In the event of a disaster at your primary site, please refer the documentation on [restoring your data from the DR site.](https://docs.zmanda.com/installation-and-configuration/step-5-run-a-restore)

Once the restore is complete, your data will be restored to the to the specified destination.

{% hint style="info" %}

* If you change the location of the DR repository, you will need to resync the DR service.
* If the DR server MAC address is not configured, you will need to configure it before downloading the license.
* The storage details for the DR repository will be automatically populated with the same details as the Primary Instance repository. If you do not see the DR repository automatically then you need to refresh the page.
  {% endhint %}

For information on configuring [DR with SSO](https://kb.zmanda.com/configuring-sso-and-ldap-for-disaster-recovery) or a dedupe server, refer to the relevant knowledge base (KB) articles.

{% hint style="info" %}
If you've changed the time zone after installing ZMC, it's essential to **restart** **the DR service** and **perform the DR restore again** to avoid unexpected behavior, like incorrectly displaying the instance as inactive after a successful restore.

Restarting the service ensures it aligns with the updated time zone and helps guarantee successful DR restores.
{% endhint %}

By following these steps, you can ensure that your data is always protected and that you can quickly recover from any disaster.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zmanda.com/zmanda-classic/information/disaster-recovery/disaster-recovery-with-zmanda-a-comprehensive-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
