# 24  Orchestrating Recovery Scenarios

Recovery Scenarios are available for:

* AWS and Azure policies
* Aurora Clusters
* All Azure targets (Virtual Machines, Disks, and SQL Servers)
* DocumentDB
* DynamoDB
* EFS
* FSx (including Lustre, OpenZFS, AWS-Managed and Self-Managed Windows FSx, ONTAP)
* Instance
* RDS (including recovery from Repository)
* RedShift
* Volume

## 24.1 Overview <a href="#id-24-1-overview" id="id-24-1-overview"></a>

The Recovery Scenarios feature allows N2W Software users to design an object that will automatically coordinate a sequence of recoveries for several or all backup targets of a single policy during one recovery session.

* A Recovery Scenario object is created with the saved configurations of successful backups for the policy.
* Depending on the target type, the user can configure how to handle tags during a recovery scenario. The default is to preserve existing tags.
* The user will save the recovery configuration for each selected backup target and add it to the Recovery Scenario object.
* At runtime, the user selects a successful backup record to use in the recovery.

Following are the options for executing a Recovery Scenario:

* Test the success of the Recovery Scenario configuration using the **Dry Run** command.
* Execute an ad hoc run of the Recovery Scenario using the **Run Scenario** command.
* Execute the Recovery Scenario on a schedule. The last successful backup is automatically selected as input. Assign or create a schedule in the **Recovery Scenario Details** tab.

{% hint style="info" %}
Backups in the Freezer are not recoverable as part of a Recovery Scenario.
{% endhint %}

## 24.2 Conditions <a href="#id-24-2-conditions" id="id-24-2-conditions"></a>

* During the Recovery Process:
  * All Recovery Scenario targets share the same destination account and destination region, which are set as part of the Recovery Scenario parameters.
  * Recovery Scenarios can have pre- and post-scripts which will run, respectively, before recovery execution and after recovery completion.
    * In case of a pre-script failure, the Recovery Scenario will not execute.
    * In case of a Recovery Scenario failure or pre-script failure, the post-script will *not* run.
* Every Recovery Scenario target has a sequential **Recovery Order** value within the Recovery Scenario which determines the order in which each target is recovered.
  * Execution of a target recovery within the recovery scenario is sequenced using the target's **Recovery Order** value. The target with the lowest **Recovery** **Order** value runs first.
  * All recovery targets sharing the same **Recovery Order** value will run in an arbitrary sequence.
  * If the recovery of a target fails, the targets next in sequential order will not run, unless Recovery Scenario’s **Continue recovering ignoring failures** parameter is enabled.
  * Testing: You can verify the Recovery Scenario input parameters, such as key pair, security groups, and VPC, by selecting the ![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Q6SOGFcOA0ajyAghjs8T/Import%20dry%20run%20icon.png) **Dry Run** link. You will be prompted to select a successful backup for the **Dry Run** just as with an actual **Run Scenario**.

## 24.3 Creating a Recovery Scenario <a href="#id-24-3-creating-a-recovery-scenario" id="id-24-3-creating-a-recovery-scenario"></a>

{% hint style="success" %}
Be sure to execute a successful **Dry Run** of the Recovery Scenario before assigning a schedule.
{% endhint %}

{% hint style="warning" %}
The configuration **Auto assigned** values may be different at run time than the values that are shown as grayed-out. To be sure about a value, switch its **Auto-assigned** toggle key to **Custom,** and enter the desired value.
{% endhint %}

**To add the details for a recovery scenario**:

1. Select the **Recovery Scenarios** tab.
2. On the <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/mTpJiDA1RBi5iMwm7abe/New%20icon.png" alt="" data-size="line"> **New** menu, select **AWS Recovery Scenario** or **Azure Recovery Scenario.**
3. In the **Recovery Scenario Details** tab, complete the fields as follows, and then select **Save**:
   * **Name** - Enter a unique name.
   * **User**, **Account**, **Policy** - Select from the lists or select<img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/mTpJiDA1RBi5iMwm7abe/New%20icon.png" alt="" data-size="line">**New**. After the addition, select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Z969MBord1BVCQjhU93L/Refresh%20icon.png" alt="" data-size="line"> **Refresh**. Select the policy for which the Recovery Scenario is defined.
   * **Recovery Destination Account** and **Recovery Destination Region** - Select from the lists.
   * **AWS Credentials** - Select **Use account AWS Credentials** or **Provide Alternate AWS Credentials**.

{% hint style="info" %}
The AWS credentials are per Recovery Scenario and not per target. All targets within the Recovery Scenario will use the selected credentials.
{% endhint %}

* **Schedule** - Optionally select a schedule from the list, or select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/mTpJiDA1RBi5iMwm7abe/New%20icon.png" alt="" data-size="line"> **New** to create a new schedule, for running the Recovery Scenario. <mark style="color:orange;">N2W highly recommends executing a</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**Dry Run**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">before assigning a schedule.</mark>
* **Recipients** - Enter the email addresses of users to receive notification of Scenario Run Scenario / Dry Run status.

{% hint style="info" %}
If SES is disabled, emails are *not* sent to recipients.
{% endhint %}

* **Enable Agent Scripts** – Select if the Recovery Scenario will be run by a custom script. The default is *not* to run user scripts. See section [24.7](#24-7-recovery-scenario-user-scripts).
  * Select **Agent Script Timeout** in seconds from the list. When the timeout is reached, N2W will skip the script and continue with the recovery scenario.
  * **Collect Script Output** – Whether to collect script output in a log. Default is to collect.
* **Continue recovering ignoring failures** – Whether to continue the sequence of recoveries in the scenario if there is a failure. The default is to not continue the script on the failure of recovery.

4. Select **Save**.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/9LY4eb6HVgeQJm6iucYd/24-3%20Rec%20Scen%20details.png)

**To add the recovery targets**:

1. Select the **Recovery Targets** tab. The available resources for each type from the policy are shown.&#x20;
2. Select one or more **Recovery Targets** from each type to add to the scenario. <mark style="color:orange;">Reminder: S3 Bucket Sync is not an option since it is not a backup action</mark>.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/99Qxr77WDBhmJtDops2N/image.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Every Recovery Scenario target has a number identifying the sequential **Recovery Order** of execution within the Recovery Scenario. The execution of the **Recovery Source** within the Recovery Scenario is sequenced using the target’s **Recovery Order** value. The recovery of the target with the lowest value runs first.&#x20;
{% endhint %}

&#x20; 3\. To change the **Recovery Source** or **Recovery** **Order** for a target, select a value from its list.

&#x20; 4\.  For each target, it is important to configure the recovery details. Follow the configuration instructions for the target:

{% hint style="info" %}
For each target, the **Auto assigned** values may be different than the values shown as grayed-out in the Configuration screen at run time. To ensure a correct value, switch the **Auto assigned** toggle key to **Custom**, and assign the correct value.
{% endhint %}

* Fo**r** Instance targets, see section [24.3.1](#24-3-1-configuring-an-instance-recovery-target).
* For Aurora Cluster targets, see section [24.3.2](#id-24.3.2-configuring-an-aurora-cluster-recovery-target).
* For Azure Virtual Machine targets, see section [24.3.3](#id-24.3.3-configuring-an-azure-virtual-machine-recovery-target).&#x20;
* For Azure SQL Server targets, see section [24.3.4](#id-24.3.4-configuring-an-azure-sql-server-recovery-target).
* For Azure Disk targets, see section [24.3.5](#id-24.3.5-configuring-an-azure-disk-recovery-target).
* For DocumentDB targets, see section [24.3.6](#id-24-4-testing-a-recovery-scenario).
* For DynamoDB targets, see section [24.3.7](#id-24.3.7-configuring-a-dynamodb-recovery-scenario).
* Fo**r** EFS targets, see section [24.3.8](#id-24.3.8-configuring-an-efs-recovery-scenario).
* For all FSx targets, see section [24.3.9](#id-24-4-testing-a-recovery-scenario-1).
* For RDS targets see section [24.3.10](#id-24.3.10-configuring-an-rds-recovery-scenario).
* For RDS recovery from a repository, see section [24.3.11](#id-24.3.11-configuring-an-rds-recovery-from-a-repository).
* For RedShift targets, see section [24.3.12](#id-24.3.12-configuring-a-redshift-recovery-scenario).
* For Volumes targets, see section [24.3.13](#id-24.3.13-configuring-a-volumes-recovery-scenario).
* For manage the recovery of target tags, see section [24.3.14](#id-24-4-testing-a-recovery-scenario-2).

&#x20;6\.  When all details are complete, select **Save** in the Create Recovery Scenario screen.

### 24.3.1 Configuring an Instance Recovery Target <a href="#id-24-3-1-configuring-an-instance-recovery-target" id="id-24-3-1-configuring-an-instance-recovery-target"></a>

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

The Configuration screen opens with additional tabs:

* **Basic Options**
* A tab for the resource type, such as **Volumes**
* **Advanced Options**

For each data item in a configuration tab, assign the appropriate value. Depending on the tab's data item:

* Select a different value from a drop-down list when the **Auto assigned** toggle key is switched to **Custom**.
* Enable or disable a feature.
* Enter a new value.

When finished with each tab, select **Close**.

{% hint style="warning" %}

* When selecting a **Custom VPC** and leaving the **VPC Subnet** toggle key on **Auto assigned**, you must ensure that this VPC has a subnet. If you leave the **VPC Subnet** toggle key on **Auto assigned** and the selected VPC does not have at least one subnet, the recovery scenario will fail.
* If **VPC** is **Auto assigned** and a scheduler is used to automatically run the recovery scenario, N2W may choose a VPC without subnets, if one exists, and the recovery scenario may fail.
  {% endhint %}

In the **Basic Options** tab, you can configure basic recovery actions, such as whether to launch from a snapshot or image, which key pair to use, and network placement.

{% hint style="info" %}
Since not all instance types are available in all AWS regions, recovery of an instance type to a region where the type is unsupported may fail. Where the instance type is not supported yet in an AWS region, N2W recommends configuring a supported **Instance Type** in the **Basic Options** parameters. See section [10.4.1](https://docs.n2ws.com/user-guide/10-performing-recovery#id-10-3-1-basic-options).
{% endhint %}

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/rP1Os0GnPvmNKreKJCOx/instance_basic.png)

In the **Volumes** tab, you can configure device information, such as capacity, type, and whether to preserve tags and delete on termination. To expand the configuration section for a volume, select the right arrow<img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/jkyliNIMHMhl88UvDwXx/right%20arrow%20icon.png" alt="" data-size="line">.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/3u3DSGgkWjOuXBp84yQT/instance_volumes.png)

In the **Advanced Options** tab for an instance, you can customize recovery target features, such as Tenancy, Shutdown Behaviour, API Termination, Auto-assign Public IP, Kernel, and RAM Disk, tags, and whether to Allow Monitoring, enable ENA, EBS Optimized, and User Data.&#x20;

The **Recover Tags** default is to preserve the existing tags. To manage the recovery of tags, see section [24.3.14](#id-24-4-testing-a-recovery-scenario-2).

To make changes, switch the **Auto assigned** toggle key to **Custom**, enter a new value, and then select **Close**.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/woohMpeEShwMOSvUbVpQ/RS%20Instance%20Adv%20Opt%20Preserved%20tags.png)

For complete details about performing an instance recovery, see section [10.4](https://docs.n2ws.com/user-guide/10-performing-recovery#id-10-3-instance-recovery-1).

### 24.3.2   Configuring an Aurora Cluster Recovery Target

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

1. &#x20;In the **Recovery Targets** tab, select a cluster, and change the **Recovery Source** and **Recovery Order** as needed.
2. Expand the details for a cluster by selecting the right arrow (![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/7eBikthPRbhCeT4L5Bhv/image.png)) next to it. To make changes, switch the **Auto assigned** toggle key to **Custom**, and enter a new value.
3. Select **Save**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/vHZKxM8QI6LlLsPKM3vr/image.png" alt=""><figcaption></figcaption></figure>

### 24.3.3  Configuring an Azure Virtual Machine Recovery Target

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

After adding the **Recovery Targets**, select a Virtual Machine target, and then select![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/RFmEyWaPtbFVpTbPBifo/Configure%20icon.png) **Configure**.

When configuring a **Virtual Machine** target, the Configuration screen opens with tabs for **Basic Options** and **Disks**.&#x20;

1. In the **Basic Options** tab, configure basic recovery actions by selecting a **Resource Group**, **Availability Type**, and **Networking** details.&#x20;
2. **The Preserve Tags** default is to preserve the existing tags. To manage the recovery of tags, see section ‎[24.3.14](#id-24-4-testing-a-recovery-scenario-2).
3. Select **Close**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Gx7mZv3n9UryYmMO8YRB/Azure%20recvry%20scen%20vm%20cropped.png" alt=""><figcaption></figcaption></figure>

&#x20; 2\.  In the **Disks** tab, configure disk information, such as **Encryption Set**.&#x20;

&#x20; 3\.  To expand the configuration section for a disk, select the right arrow (<img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/6jBsuQ2XfTzYSBcUIDAJ/right%20arrow%20icon.png" alt="" data-size="line">).&#x20;

&#x20;       1\.   Change **Name** to the desired name for the recovered disk.&#x20;

&#x20;       2\.  The **Preserve Tags** default is to preserve the existing tags. To manage the recovery of tags, see section ‎[24.3.14](#id-24-4-testing-a-recovery-scenario-2).

&#x20;  4\.  Select **Close**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/e4XS5r1Vi8m79ifgcV4j/Azure%20recvry%20scen%20vm%20disks%20cropped.png" alt=""><figcaption></figcaption></figure>

### 24.3.4 Configuring an Azure SQL Server Recovery Target

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

After adding the **Recovery Targets**, select an SQL Server target, and then select![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/RFmEyWaPtbFVpTbPBifo/Configure%20icon.png) **Configure**.

When configuring an SQL Server target, the Configuration screen opens with tabs for **Basic Options**, **Network**, **SQL Server's Databases**, and **Worker Options**. See section [26.9.5](https://docs.n2ws.com/user-guide/26-using-n2ws-with-azure#id-26.9.5-recovering-an-sql-server-and-databases).

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/QXxcVzZhdq75YXExF9uh/Azure%20recvry%20scen%20sql%20server%20cropped.png" alt=""><figcaption></figcaption></figure>

### 24.3.5 Configuring an Azure Disk Recovery Target

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

1. In the **Recovery Targets** tab, select a disk, and change the **Recovery Source** and **Recovery Order** as needed.
2. Expand the details for a disk by selecting the right arrow (![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/gcwW8hN4S6ICA2arNJk4/image.png)) next to it. Change **Name** to the desired name for the recovered disk. Update other fields as needed.
3. Select **Save**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/mF8ViEitU75eNYk3c2rl/Rec%20Scen%20Azure%20Disk%20Rec%20Targets.png" alt=""><figcaption></figcaption></figure>

### 24.3.6 Configuring a DocumentDB Recovery Scenario <a href="#id-24-4-testing-a-recovery-scenario" id="id-24-4-testing-a-recovery-scenario"></a>

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

1. In the **DocumentDB** section, select a cluster, and change the **Recovery Source** and **Recovery Order** as needed.
2. Expand the details for a cluster by selecting the right arrow (![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/TGJ2Mfei3T0Uj7Dnv71H/image.png)) next to it. You can change **Cluster ID**, **Instance Class**, **VPC**, **Security Groups**, and **Subnet Group**.
3. Select **Save**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/O4Ktu5r06UxoyOxWgFV6/image.png" alt=""><figcaption></figcaption></figure>

### 24.3.7  Configuring a DynamoDB Recovery Scenario

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

1. In the D**ynamoDB Tables** section, select a table and change the **Recovery Source** and **Recovery Order** as needed.
2. Expand the details for a table by selecting the right arrow (![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/4xmZlypfat5UiMYj1zcx/image.png)) next to it. Change **Name** to the desired name for the recovered table. Update **IAM Role** as needed.
3. Select **Save.**

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/cUXw4iaQOSzPmjTCWbyR/image.png" alt=""><figcaption></figcaption></figure>

### 24.3.8  Configuring an EFS Recovery Scenario

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

1. In the **Elastic File Systems** section, select an EFS, and change the **Recovery Source** and **Recovery Order** as needed.
2. Expand the details for an EFS by selecting the right arrow (![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/dtMTLSbs6gEGhuVwJ3HB/image.png)) next to it. You can change **Encryption Key** and tags. The **Recover Tags** default is to preserve the existing tags. To manage the recovery of tags, see section ‎[24.3.14](#id-24-4-testing-a-recovery-scenario-2).
3. Select **Save**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/l0ocuCdBHSxqjIdz4hcQ/image.png" alt=""><figcaption></figcaption></figure>

### 24.3.9 Configuring an FSx Recovery Scenario <a href="#id-24-4-testing-a-recovery-scenario" id="id-24-4-testing-a-recovery-scenario"></a>

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

Recovery Scenario is possible for the following types of FSx:

* Lustre (section [24.3.9.1](#id-24.3.9.1-lustre-and-openzfs-fsx-recovery-scenario))
* NetApp ONTAP (section [24.3.9.3](#id-24.3.9.3-ontap-fsx-recovery-scenario))
* OpenZFS (section [24.3.9.1](#id-24.3.9.1-lustre-and-openzfs-fsx-recovery-scenario))
* Windows File Server ([section 24.3.9.2](#id-24.3.9.2-windows-fsx-recovery-scenario))

Each FSx type has different configuration settings.&#x20;

#### 24.3.9.1 Lustre and OpenZFs FSx Recovery Scenario

1. In the **FSx File Systems** section, select an FSx, and change the **Recovery Source** and **Recovery Order** as needed.
2. Expand the details for an FSx by selecting the right arrow ( ![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/iowxrCggRXSg9lQvAniD/image.png)) next to it. You can make changes as needed. The **Recover Tags** default is to preserve the existing tags. To manage the recovery of tags, see section ‎‎[24.3.14](#id-24-4-testing-a-recovery-scenario-2).
3. If there are Windows managed Active Directories, update as described below.
4. Select **Save**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/6EAn00jTJ50eXzZ0jw8w/image.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Customizing a target VPC allows for customizing  and **Subnets**, as shown below.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/RKSVlqj7gMpptMqGC5wN/image.png" alt=""><figcaption></figcaption></figure>

#### **24.3.9.2          Windows FSx Recovery Scenario**

N2W supports the following types of Windows FSx file systems:

* Windows with Self-Managed Active Directory
* Windows with AWS-Managed Active Directory

**AWS-Managed Active Directory**

When selecting a Windows FSx with AWS-Managed Active Directory, you can select the **Active Directory** from the target’s AWS account and manage recovery tags.

The **Recover Tags** default is to preserve the existing values. To manage the recovery of tags, see section [24.3.14](#id-24-4-testing-a-recovery-scenario-2).

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/y6WH8Hyf2u04u5L0Hw51/image.png" alt=""><figcaption></figcaption></figure>

**Self-Managed Active Directory**

For Self-Managed Active Directory Windows FSx, user can manage recovery tags and add the self-managed **Active Directory** settings to the Recovery Scenario:&#x20;

* Domain Name
* Admin Group
* Service account username and password

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/1diJQ9O6LO1ABsbTpUDr/image.png" alt=""><figcaption></figcaption></figure>

#### **24.3.9.3  ONTAP FSx Recovery Scenario**

The ONTAP FSx Recovery Scenario has a configuration window. To open the configuration window, select an ONTAP FSx, and select the ![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/nCtOdZGsJx5vlZnS4eHk/Configure%20icon.png)  **Configure** button:&#x20;

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/aaTZyIE1Pg7G3rSWcE4M/image.png" alt=""><figcaption></figcaption></figure>

After selecting **Configure**, the Configure FSx File System box opens with 3 tabs.

The **Common FSx Options** tab includes **Target VPC**, **Security Groups**, **Subnet ID**, and **Recover Tags** options. The **Recover Tags** default is to preserve the existing tags. To manage the recovery of tags, see section [24.3.14](#id-24-4-testing-a-recovery-scenario-2).

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/ny0OyYNCs2StK7ZuUQJd/image.png" alt=""><figcaption></figcaption></figure>

The **ONTAP Specific Options** tab includes **Original FSx Name** and an option for a file system administrative password.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/LxWC9F63MEAGapAs0A9O/image.png" alt=""><figcaption></figcaption></figure>

The SVMs and Volumes tab currently allows only Support Vector Machines (SVMs). All volumes will be selected with default settings.

To change the name of the SVM, switch the toggle key to **Custom**, and enter a new **Recovered SVM Name**. Select **Specify SVM password** to enter a password.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/zzgb71hmaaRXemg9N5oT/image.png" alt=""><figcaption></figcaption></figure>

### 24.3.10  Configuring an RDS Recovery Scenario

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

1. In the **Recovery Targets** tab, select an RDS cluster, and change the **Recovery Source** and **Recovery Order** as needed.
2. Select the right arrow (![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/uKj45Gz0Lj7npt8OmS8C/image.png))  to show the details for a resource.
3. Make changes as necessary, and then select **Save**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/NqkmAHEfbEhgQn1IoTHS/Rec%20Scen%20AWS%20RDS%20cluster%20rec%20target%20cropped.png" alt=""><figcaption></figcaption></figure>

### 24.3.11  Configuring an RDS Recovery from a Repository

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

1. After configuring the RDS Recovery Scenario in the **Recovery Scenario Details** tab, select the **Recovery Targets** tab.
2. In the **Recovery Source** drop-down list, choose the repository to recover from.
3. Select ![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/TohJhmDwkbEL0QsRgVC0/image.png)**Configure**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/RCnlTEfawhCFvA52FGQf/image.png" alt=""><figcaption></figcaption></figure>

&#x20; 4\.  In the **Basic Options** tab, set additional parameters related to the recovery of RDS from the repository. Use the RDS Admin credentials for **Username** and **Password**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/RyhY6XyAoRNzglOv56a7/image.png" alt=""><figcaption></figcaption></figure>

&#x20; 5\.  In the **Worker Configuration** tab, set the parameters for the worker that will be launched for the recovery.&#x20;

### 24.3.12  Configuring a RedShift Recovery Scenario

See section [24.3](#24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets**.

1. In the **Redshift Clusters** section, select a cluster, and change the **Recovery Source** and **Recovery Order** as needed.
2. Select the right arrow (![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/RTvALWR0LgV2MQy8npdH/image.png)) to show the details for resource, and make changes as necessary.
3. Select **Save**.

The RedShift Recovery Scenario has basic options to configure: **Cluster ID, Zone, Port**, and **Subnet Group.**

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/VfgIpVxexOYMjuThAu4g/image.png" alt=""><figcaption></figcaption></figure>

### 24.3.13  Configuring a Volumes Recovery Scenario

See section ‎[24.3](#id-24-3-creating-a-recovery-scenario) for instructions on how to create a **Recovery Scenario** and **Add Recovery Targets.**

The Volumes Recovery Scenario screen has only the **Basic Options** tab.&#x20;

The **Recover Tags** default is to preserve the existing tags. To manage the recovery of tags, see section [24.3.14](#id-24-4-testing-a-recovery-scenario-2).

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/wiK0iVY1Bvxc9NhQElWc/recovery_scenarios_volume_recovery.png" alt=""><figcaption></figcaption></figure>

### 24.3.14  Managing Tag Recovery <a href="#id-24-4-testing-a-recovery-scenario" id="id-24-4-testing-a-recovery-scenario"></a>

You have the option to change tags and tag values. In the **Recover Tags** section, switch the **Auto assigned** toggle key to **Custom,** and select a tag option:

* **No Tags** – Do not recover tags.
* **Preserve (and Add/Override)** – You can preserve (default), add to, or override the tags on the version of the resource selected for the recovery.
* **Fixed Tags** – Initial display is current list of tags on resource. Set the tags to be used during recovery even if the user has subsequently changed the tags on the resource.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/BLba1hyeCx1VMTFygoV0/image.png" alt=""><figcaption></figcaption></figure>

## 24.4 Testing a Recovery Scenario <a href="#id-24-4-testing-a-recovery-scenario" id="id-24-4-testing-a-recovery-scenario"></a>

The **Dry Run** option allows you to determine whether the input parameters, such as key pair, security groups, and VPC, are correct for the recovery.

**To test a Recovery Scenario:**

1. In the **Recovery Scenarios** tab, select a Recovery Scenario and then select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Q6SOGFcOA0ajyAghjs8T/Import%20dry%20run%20icon.png" alt="" data-size="line"> **Dry Run.**
2. In the list of successful backups, select one backup to perform the test with, and then select **Dry Run.**
3. Open the **Recovery Scenario Monitor**.
4. In the **Status** column for the Recovery Scenario, you will see a success message for the test: ![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/LgyK3hoXL7Y8BEVSGDoy/recovery%20success%20msg.png)​
5. Selecting <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/N715zPA8tn3VNU6yOr2K/Recover%20icon.png" alt="" data-size="line"> **Recoveries** brings you to the regular **Recovery Monitor**.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/atI7YAWwLg0jR4ULd9J7/24-4%20RS%20Test%20Bckups-cropped.png)

## 24.5 Managing Recovery Scenarios and Targets <a href="#id-24-5-managing-recovery-scenarios-and-targets" id="id-24-5-managing-recovery-scenarios-and-targets"></a>

**To manage a Recovery Scenario object:**

1. In the **Recovery Scenarios** tab, select a scenario.
2. Select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Q5aOzuQ1b5mnQgt6kktm/edit%20icon.png" alt="" data-size="line"> Edit, <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/OkeJ0ZFYTopb2Nm4kutj/delete%20icon.png" alt="" data-size="line"> **Delete**, <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/qzRGVWhOuuUlHREgzr3Q/misc%20run%20icon.png" alt="" data-size="line"> **Run Scenario**, or <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Q6SOGFcOA0ajyAghjs8T/Import%20dry%20run%20icon.png" alt="" data-size="line"> **Dry Run,** as needed.

**To manage targets in the scenario:**

1. In the Recovery **Scenarios** tab, select a scenario, and then select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Q5aOzuQ1b5mnQgt6kktm/edit%20icon.png" alt="" data-size="line"> **Edit**.
2. To delete a target, select the **Recovery Targets** tab, select a target, and then select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Mabg8oAcDH4ojjYHbaWN/remove%20icon.png" alt="" data-size="line"> **Remove** **from** **List**.
3. Depending on the resource type, the action <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/bdc8yYXivvOVPuEqXLBQ/Configure%20icon.png" alt="" data-size="line"> **Configure** is availabl&#x65;**. Configure** opens tabs for **Basic Options**, resource type details, and **Advanced Options**.

## 24.6 Running and Monitoring a Recovery Scenario <a href="#id-24-6-running-and-monitoring-a-recovery-scenario" id="id-24-6-running-and-monitoring-a-recovery-scenario"></a>

A Recovery Scenario can also be run on a schedule using the last successful backup. To assign or create a schedule, see section [24.3](#24-3-creating-a-recovery-scenario).

1. ​In the **Recovery Scenarios** tab, select a Recovery Scenario and then select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/qzRGVWhOuuUlHREgzr3Q/misc%20run%20icon.png" alt="" data-size="line"> **Run Scenario**. A list of backups, successful and unsuccessful, opens.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/3WnO8PN465rQQB3oPE4v/24-6%20RS%20Select%20bckup%20to%20recover%20fr-cropped.png)

&#x20; 2\. Select one successful backup to recover from and then select **Recover**. The started message opens in the top right corner:![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/LFzb8EmHjKlIHw2OECsw/recovery%20scenario%20run%20started%20msg.png)​

&#x20; 3\. To open the **Recovery Scenario Monitor**, select the link, or select the **Recovery Scenario Monitor** tab.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Ft3imYtd3xooN4qDK9vZ/24-6%20RS%20Monitor-cropped.png)

* A **Status** of ‘Recovery succeeded’ with a test tube symbol <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/fYvghYoB1UOY4poEUZN4/test%20icon.png" alt="" data-size="line"> next to it indicates that the recovery was a Dry Run.

&#x20; 4\. To view details of the recovery in the Run Log, select a **Recovery Scenario** and then select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/VezUOUWjsYzVcW32JJwb/Show%20log%20icon.png" alt="" data-size="line"> **Log**.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/3vQiW2Ky51fTUOFc35gq/24-6%20RS%20Log-cropped.png)

5\. To delete a run record, select a scenario, and then select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/OkeJ0ZFYTopb2Nm4kutj/delete%20icon.png" alt="" data-size="line"> **Delete Record.**

{% hint style="warning" %}
Deleting a run record will trigger the deletion of all its target recovery records.
{% endhint %}

6\. To view a live recovery, in the **Recovery Scenario Monito**r, select a scenario, and then select <img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/N715zPA8tn3VNU6yOr2K/Recover%20icon.png" alt="" data-size="line"> **Recoveries**. The **Recovery Monitor** opens.

## 24.7 Recovery Scenario User Scripts <a href="#id-24-7-recovery-scenario-user-scripts" id="id-24-7-recovery-scenario-user-scripts"></a>

When **Enable Agent Scripts** is set in the **Recovery Scenario Details** tab, N2W will run two scripts, one before and one after the recovery run:

* `before_<recovery-scenario-name>`
* `after_<recovery-scenario-name>`

A file extension is optional and, if added, may be for any interpreter.

{% hint style="info" %}
This is somewhat like the Linux Backup Scripts feature described in the Before Script and After Script topics, sections [6.3.1](https://docs.n2ws.com/user-guide/6-windows-instances-backup#6-2-1-how-n-2-ws-uses-vss) and [6.3.2](https://docs.n2ws.com/user-guide/6-windows-instances-backup#6-2-2-configuring-vss).
{% endhint %}

These scripts must be located on the N2W server in the following folders:

* For root user: `/cpmdata/scripts/scenario`
* For non-root user: /`cpmdata/scripts/scenario/user_names`

### 24.7.1 Before Script <a href="#id-24-7-1-before-script" id="id-24-7-1-before-script"></a>

The **before** script passes the following parameters, in the following order:

<table data-header-hidden><thead><tr><th width="139.33333333333331">#</th><th width="204">Parameter</th><th>Notes</th></tr></thead><tbody><tr><td>#</td><td>Parameter</td><td>Notes</td></tr><tr><td>1</td><td>Scenario Id</td><td></td></tr><tr><td>2</td><td>Account Id</td><td>May be null, if the value is <code>NULL</code>.</td></tr><tr><td>3</td><td>Policy account Id</td><td></td></tr><tr><td>4</td><td>Destination region</td><td>May be null, if the value is <code>NULL</code>.</td></tr></tbody></table>

### 24.7.2 After Script <a href="#id-24-7-2-after-script" id="id-24-7-2-after-script"></a>

The **after** script passes the same parameters as the **before** with the addition of parameters for the scenario’s recovery targets:

<table data-header-hidden><thead><tr><th width="86">#</th><th width="120">Param.</th><th>Notes</th><th></th></tr></thead><tbody><tr><td>#</td><td>Param.</td><td>Notes</td><td></td></tr><tr><td>1-4</td><td>...</td><td>Same as <code>before_</code> parameters</td><td></td></tr><tr><td>5</td><td>Target lists</td><td>Each target is in colon-separated format:</td><td></td></tr><tr><td></td><td></td><td><p><strong>RecoveryType:OriginalAwsResourceId:</strong> </p><p><strong>OriginalRegion:RecoveredAwsResourceId</strong></p></td><td></td></tr><tr><td></td><td></td><td><strong>RecoveryType</strong></td><td>Single character identifying resource type:</td></tr><tr><td></td><td></td><td></td><td><code>I</code> - Instance</td></tr><tr><td></td><td></td><td></td><td><code>V</code> - Volume</td></tr><tr><td></td><td></td><td></td><td><code>R</code> - RDS Database</td></tr><tr><td></td><td></td><td></td><td><code>A</code> - RDS (Aurora) Cluster</td></tr><tr><td></td><td></td><td></td><td><code>C</code> - Redshift Cluster</td></tr><tr><td></td><td></td><td></td><td><code>D</code> - DynamoDB</td></tr><tr><td></td><td></td><td></td><td><code>E</code> - EFS</td></tr><tr><td></td><td></td><td></td><td><code>F</code> - FSX</td></tr><tr><td></td><td></td><td><strong>OriginalAwsResourceID</strong></td><td>AWS ID of the original resource</td></tr><tr><td></td><td></td><td><strong>OriginalRegion</strong></td><td>AWS region of the original resource</td></tr><tr><td></td><td></td><td><strong>RecoveredAwsResourceID</strong></td><td>AWS ID of the recovered resource. If not recovered, then '<code>null</code>'.</td></tr></tbody></table>

Following is an example of an **`after_`** script for a Recovery Scenario that was defined with 2 targets: an EC2-instance and an EC2-volume. The **`after_`** script passes 6 parameters, 2 of which are for the targets. In the following example, the instance recovery target was not recovered:

```
1
null
1
null
I:i-0a87ab83ca3fa62c2:us-east-1:null
V:vol-0197aba1f7090c513:us-east-1:vol-03336f4ed151b5d29
```


---

# Agent Instructions: 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:

```
GET https://docs.n2ws.com/user-guide/24-orchestrating-recovery-scenarios.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
