

# Creating your gateway
<a name="creating-your-gateway"></a>

The overview sections on this page provide a high-level synopsis of how the Storage Gateway creation process works. For step-by-step procedures to create a specific type of gateway using the Storage Gateway console, see the following topics:
+ [Create and activate an Amazon S3 File Gateway](https://docs.aws.amazon.com/filegateway/latest/files3/create-gateway-file.html)
+ [Create and activate an Amazon FSx File Gateway](https://docs.aws.amazon.com/filegateway/latest/filefsxw/create-gateway-file.html)
+ [Create and activate a Tape Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-tape-gateway.html)
+ [Create and activate a Volume Gateway](https://docs.aws.amazon.com/storagegateway/latest/vgw/create-volume-gateway-volume.html)

**Important**  
Amazon FSx File Gateway is no longer available to new customers. Existing customers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit [this blog post](https://aws.amazon.com/blogs/storage/switch-your-file-share-access-from-amazon-fsx-file-gateway-to-amazon-fsx-for-windows-file-server/).

## Overview - Gateway Activation
<a name="how-it-works-create-gateway-activate"></a>

Gateway activation involves setting up your gateway, connecting it to AWS, then reviewing your settings and activating it.

### Set up gateway
<a name="w2ab1c15b9b5"></a>

To set up your Storage Gateway, you first choose the type of gateway you want to create and the host platform on which you will run the gateway virtual appliance. You then download the gateway virtual appliance template for the platform of your choice and deploy it in your on-premises environment. You can also deploy your Storage Gateway as a physical hardware appliance that you order from your preferred reseller, or as an Amazon EC2 instance in your AWS cloud environment. When you deploy the gateway appliance, you allocate local physical disk space on the virtualization host.

### Connect to AWS
<a name="w2ab1c15b9b7"></a>

The next step is to connect your gateway to AWS. To do this, you first choose the type of service endpoint you want to use for communications between the gateway virtual appliance and AWS services in the cloud. This endpoint can be accessible from the public internet, or only from within your Amazon VPC, where you have full control over the network security configuration. You then specify the gateway's IP address or its activation key, which you can obtain by connecting to the local console on the gateway appliance.

### Review and activate
<a name="w2ab1c15b9b9"></a>

At this point, you'll have an opportunity to review the gateway and connection options you chose, and make changes if necessary. When everything is set up the way you want you can activate the gateway. Before you can start using your activated gateway, you will need to configure some additional settings and create your storage resources.

## Overview - Gateway Configuration
<a name="how-it-works-create-gateway-configure"></a>

After you activate your Storage Gateway, you need to perform some additional configuration. In this step, you allocate the physical storage you provisioned on the gateway host platform to be used as either the cache or the upload buffer by the gateway appliance. You then configure settings to help monitor the health of your gateway using Amazon CloudWatch Logs and CloudWatch alarms, and add tags to help identify the gateway, if desired. Before you can start using your activated and configured gateway, you will need to create your storage resources.

## Overview - Storage Resources
<a name="how-it-works-create-resource"></a>

After you activate and configure your Storage Gateway, you need to create cloud storage resources for it to use. Depending on the type of gateway you created, you will use the Storage Gateway console to create Volumes, Tapes, or Amazon S3 or Amazon FSx files shares to associate with it. Each gateway type uses its respective resources to emulate the related type of network storage infrastructure, and transfers the data you write to it into the AWS cloud.

# Create and activate a Tape Gateway
<a name="create-gateway-vtl"></a>

In this section, you can find instructions on how to download, deploy, and activate a standard Tape Gateway.

**Topics**
+ [

## Set up a Tape Gateway
](#set-up-gateway-tape)
+ [

## Connect your Tape Gateway to AWS
](#connect-to-amazon-tape)
+ [

## Review settings and activate your Tape Gateway
](#review-and-activate-tape)
+ [

## Configure your Tape Gateway
](#configure-gateway-tape)

## Set up a Tape Gateway
<a name="set-up-gateway-tape"></a>

**To set up a new Tape Gateway**

1. Open the AWS Management Console at [https://console.aws.amazon.com/storagegateway/home/](https://console.aws.amazon.com/storagegateway/home/), and choose the AWS Region where you want to create your gateway.

1. Choose **Create gateway** to open the **Set up gateway** page.

1. In the **Gateway settings** section, do the following:

   1. For **Gateway name**, enter a name for your gateway. You can search for this name to find your gateway on list pages in the Storage Gateway console.

   1. For **Gateway time zone**, choose the local time zone for the part of the world where you want to deploy your gateway.

1. In the **Gateway options** section, for **Gateway type**, choose **Tape Gateway**.

1. In the **Platform options** section, do the following:

   1. For **Host platform**, choose the platform on which you want to deploy your gateway, then follow the platform-specific instructions displayed on the Storage Gateway console page to set up your host platform. You can choose from the following options:
      + **VMware ESXi** - Download, deploy, and configure the gateway virtual machine using VMware ESXi.
      + **Microsoft Hyper-V** - Download, deploy, and configure the gateway virtual machine using Microsoft Hyper-V.
      + **Linux KVM** - Download, deploy, and configure the gateway virtual machine using Linux KVM. Refer to the provided aws-storage-gateway.xml file for suggested boot configurations. UEFI boot mode with secure boot disabled (loader\$1secure=no) is required for File Gateway 2.x, Volume Gateway 3.x, and Tape Gateway 3.x.
      + **Amazon EC2** - Configure and launch an Amazon EC2 instance to host your gateway. This option is not available for **Stored volume** gateways.
      + **Hardware appliance** - Order a dedicated physical hardware appliance from AWS to host your gateway.

   1. For **Confirm set up gateway**, select the check box to confirm that you performed the deployment steps for the host platform you chose. This step is not applicable for the **Hardware appliance** host platform.

1. In the **Backup application settings** section, for **Backup application**, choose the application you want to use to backup your tape data to the virtual tapes associated with your Tape Gateway.

1. Choose **Next** to proceed.

Now that your gateway is set up, you need to choose how you want it to connect and communicate with AWS. For instructions, see [Connect your Tape Gateway to AWS](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#connect-to-amazon-tape).

## Connect your Tape Gateway to AWS
<a name="connect-to-amazon-tape"></a>

**To connect a new Tape Gateway to AWS**

1. Complete the procedure described in [Set up a Tape Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#set-up-gateway-tape) if you have not done so already. When finished, choose **Next** to open the **Connect to AWS** page in the Storage Gateway console.

1. In the **Endpoint options** section, for **Service endpoint**, choose the type of endpoint your gateway will use to communicate with AWS. You can choose from the following options:
   + **Publicly accessible** - Your gateway communicates with AWS over the public internet. If you select this option, use the **FIPS enabled endpoint** check box to specify whether the connection should comply with Federal Information Processing Standards (FIPS).
**Note**  
If you require FIPS 140-2 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS-compliant endpoint. For more information, see [Federal Information Processing Standard (FIPS) 140-2](https://aws.amazon.com/compliance/fips/).  
The FIPS service endpoint is only available in some AWS Regions. For more information, see [Storage Gateway endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/sg.html) in the *AWS General Reference*.
   + **VPC hosted** - Your gateway communicates with AWS through a private connection with your VPC, allowing you to control your network settings. If you select this option, you must specify an existing VPC endpoint by choosing its VPC endpoint ID from the drop-down menu, or by providing its VPC endpoint DNS name or IP address. For more information, see [Activating your gateway in a virtual private cloud](https://docs.aws.amazon.com/storagegateway/latest/tgw/gateway-private-link.html).

1. In the **Gateway connection options** section, for **Connection options**, choose how to identify your gateway to AWS. You can choose from the following options:
   + **IP address** - Provide the IP address of your gateway in the corresponding field. This IP address must be public or accessible from within your current network, and you must be able to connect to it from your web browser.

     You can obtain the gateway IP address by logging into the gateway's local console from your hypervisor client, or by copying it from your Amazon EC2 instance details page.
   + **Activation key** - Provide the activation key for your gateway in the corresponding field. You can generate an activation key using the gateway's local console. Choose this option if your gateway's IP address is unavailable.

1. Choose **Next** to proceed.

Now that you have chosen how you want your gateway to connect to AWS, you need to activate the gateway. For instructions, see [Review settings and activate your Tape Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#review-and-activate-tape).

## Review settings and activate your Tape Gateway
<a name="review-and-activate-tape"></a>

**To activate a new Tape Gateway**

1. Complete the procedures described in the following topics if you have not done so already:
   + [Set up a Tape Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#set-up-gateway-tape)
   + [Connect your Tape Gateway to AWS](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#connect-to-amazon-tape)

   When finished, choose **Next** to open the **Review and activate** page in the Storage Gateway console.

1. Review the initial gateway details for each section on the page.

1. If a section contains errors, choose **Edit** to return to the corresponding settings page and make changes.
**Note**  
You cannot modify the gateway options or connection settings after your gateway is activated.

1. Choose **Activate gateway** to proceed.

Now that you have activated your gateway, you need to perform first-time configuration to allocate local storage disks and configure logging. For instructions, see [Configure your Tape Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#configure-gateway-tape).

## Configure your Tape Gateway
<a name="configure-gateway-tape"></a>

**To perform first-time configuration on a new Tape Gateway**

1. Complete the procedures described in the following topics if you have not done so already:
   + [Set up a Tape Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#set-up-gateway-tape)
   + [Connect your Tape Gateway to AWS](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#connect-to-amazon-tape)
   + [Review settings and activate your Tape Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#review-and-activate-tape)

   When finished, choose **Next** to open the **Configure gateway** page in the Storage Gateway console.

1. In the **Configure storage** section, use the drop-down menus to allocate at least one disk with at least **165 GiB** capacity for **CACHE STORAGE**, and at least one disk with at least **150 GiB** capacity for **UPLOAD BUFFER**. The local disks listed in this section correspond to the physical storage that you provisioned on your host platform.

1. In the **CloudWatch log group** section, choose how to set up Amazon CloudWatch Logs to monitor the health of your gateway. You can choose from the following options:
   + **Create a new log group** - Set up a new log group to monitor your gateway.
   + **Use an existing log group** - Choose an existing log group from the corresponding drop-down menu.
   + **Deactivate logging** - Do not use Amazon CloudWatch Logs to monitor your gateway.
**Note**  
To receive Storage Gateway health logs, the following permissions must be present in your log group resource policy. Replace the *highlighted section* with the specific log group resourceArn information for your deployment.  

   ```
   "Sid": "AWSLogDeliveryWrite20150319",
         "Effect": "Allow",
         "Principal": {
           "Service": [
             "delivery.logs.amazonaws.com"
           ]
         },
         "Action": [
           "logs:CreateLogStream",
           "logs:PutLogEvents"
         ],
         "Resource": "arn:aws:logs:eu-west-1:1234567890:log-group:/foo/bar:log-stream:*"
   ```
The "Resource" element is required only if you want the permissions to apply explicitly to an individual log group.

1. In the **CloudWatch alarms** section, choose how to set up Amazon CloudWatch alarms to notify you when gateway metrics deviate from defined limits. You can choose from the following options:
   + **Create Storage Gateway's recommended alarms** – Create all recommended CloudWatch alarms automatically when the gateway is created. For more information about recommended alarms, see [Understanding CloudWatch alarms](https://docs.aws.amazon.com/storagegateway/latest/tgw/Main_monitoring-gateways-common.html#cloudwatch-alarms).
**Note**  
This feature requires CloudWatch policy permissions, which are *not* automatically granted as part of the preconfigured Storage Gateway full access policy. Make sure your security policy grants the following permissions before you attempt to create recommended CloudWatch alarms:  
`cloudwatch:PutMetricAlarm` - create alarms
`cloudwatch:DisableAlarmActions` - turn alarm actions off
`cloudwatch:EnableAlarmActions` - turn alarm actions on
`cloudwatch:DeleteAlarms` - delete alarms
   + **Create a custom alarm** – Configure a new CloudWatch alarm to notify you about your gateway's metrics. Choose **Create alarm** to define metrics and specify alarm actions in the Amazon CloudWatch console. For instructions, see [Using Amazon CloudWatch alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html) in the *Amazon CloudWatch User Guide*.
   + **No alarm** – Don't receive CloudWatch notifications about your gateway's metrics.

1. (Optional) In the **Tags** section, choose **Add new tag**, then enter a case-sensitive key-value pair to help you search and filter for your gateway on list pages in the Storage Gateway console. Repeat this step to add as many tags as you need.

1. Choose **Configure** to finish creating your gateway.

   To check the status of your new gateway, search for it on the **Gateway overview** page of the Storage Gateway.

Now that you have created your gateway, you need to create virtual tapes for it to use. For instructions, see [Creating Tapes](https://docs.aws.amazon.com/storagegateway/latest/tgw/GettingStartedCreateTapes.html).

# Creating new virtual tapes for Tape Gateway
<a name="GettingStartedCreateTapes"></a>

This section describes how to create new virtual tapes using AWS Storage Gateway. You can create new virtual tapes manually using either the AWS Storage Gateway console or the Storage Gateway API. You can also configure your Tape Gateway to create them automatically, which helps decrease the need for manual tape management, makes your large deployments simpler, and helps scale on-premises and archive storage needs.

Tape Gateway supports *write once, read many* (WORM) and *tape retention lock* on virtual tapes. WORM-activated virtual tapes help ensure that the data on active tapes in your virtual tape library cannot be overwritten or erased. For more information about WORM protection for virtual tapes, see the section following, [Write Once, Read Many (WORM) Tape Protection](#WORM). 

With tape retention lock, you can specify the retention mode and period on archived virtual tapes, preventing them from being deleted for a fixed amount of time up to 100 years. It includes permission controls on who can delete tapes or modify the retention settings. For more information about tape retention lock, see [Using Tape Retention Lock](CreatingCustomTapePool.md#TapeRetentionLock). 

**Note**  
You are charged only for the amount of data that you write to the tape, not the tape capacity.  
You can use AWS Key Management Service (AWS KMS) to encrypt data written to a virtual tape that is stored in Amazon Simple Storage Service (Amazon S3). Currently, you can do this by using the AWS Storage Gateway API or AWS Command Line Interface (AWS CLI). For more information, see [CreateTapes](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_CreateTapes.html) or [create-tapes](https://docs.aws.amazon.com/cli/latest/reference/storagegateway/create-tapes.html).

## Write Once, Read Many (WORM) Tape Protection
<a name="WORM"></a>

You can prevent virtual tapes from being overwritten or erased by activating WORM protection for virtual tapes in AWS Storage Gateway. WORM protection for virtual tapes is activated when creating tapes.

Data that is written to WORM virtual tapes can't be overwritten. Only new data can be appended to WORM virtual tapes, and existing data can't be erased. Activating WORM protection for virtual tapes helps protect those tapes while they are in active use, before they are ejected and archived. 

WORM configuration can only be set when tapes are created, and that configuration cannot be changed after the tapes are created.

# Creating Tapes Manually
<a name="CreateTapesManually"></a>

You can create new virtual tapes manually using either the AWS Storage Gateway console or the Storage Gateway API. The console offers a convenient interface for tape creation with the flexibility to specify a prefix for a randomly-generated tape barcode. If you need to fully customize your tape barcodes (for example, to match the serial number of a corresponding physical tape), you must use the API. For more information on creating tapes using the Storage Gateway API. see [CreateTapeWithBarcode](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_CreateTapeWithBarcode.html) in the *Storage Gateway API Reference*.

**To create virtual tapes manually using the Storage Gateway console**

1. Open the Storage Gateway console at [https://console.aws.amazon.com/storagegateway/home](https://console.aws.amazon.com/storagegateway/).

1. In the navigation pane, choose the **Gateways** tab.

1. Choose **Create tapes** to open the **Create tapes** pane.

1. For **Gateway**, choose a gateway. The tape is created for this gateway.

1. For **Tape type**, choose **Standard** to create standard virtual tapes. Choose **WORM** to create *write once read many* (WORM) virtual tapes. For more information, see [Write Once, Read Many (WORM) Tape Protection ](https://docs.aws.amazon.com/storagegateway/latest/tgw/GettingStartedCreateTapes.html#WORM).

1. For **Number of tapes**, choose the number of tapes that you want to create. For more information about tape quotas, see [AWS Storage Gateway quotas](resource-gateway-limits.md).

1. For **Capacity**, enter the size of the virtual tape that you want to create. Tapes must be larger than 100 GiB. For information about capacity quotas, see [AWS Storage Gateway quotas](resource-gateway-limits.md).

1. For **Barcode prefix**, enter the prefix that you want to prepend to the barcode of your virtual tapes.
**Note**  
Virtual tapes are uniquely identified by a barcode, and you can add a prefix to the barcode. You can use a prefix to help identify your virtual tapes. The prefix must be uppercase letters (A–Z) and must be one to four characters long.

1. For **Pool**, choose **Glacier Pool**, **Deep Archive Pool**, or a custom pool that you have created. The pool determines the storage class in which your tape is stored when it is ejected by your backup software. 
   + Choose **Glacier Pool** if you want to archive the tape in the S3 Glacier Flexible Retrieval storage class. When your backup software ejects the tape, it is automatically archived in S3 Glacier Flexible Retrieval. You use S3 Glacier Flexible Retrieval for more active archives, where you can retrieve a tape typically within 3-5 hours. For more information, see [Storage classes for archiving objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-glacier) in the *Amazon Simple Storage Service User Guide*.
   + Choose **Deep Archive Pool** if you want to archive the tape in the S3 Glacier Deep Archive storage class. When your backup software ejects the tape, the tape is automatically archived in S3 Glacier Deep Archive. You use S3 Glacier Deep Archive for long-term data retention and digital preservation, where data is accessed once or twice a year. You can retrieve a tape archived in S3 Glacier Deep Archive typically within 12 hours. For more information, see [Storage classes for archiving objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-glacier) in the *Amazon Simple Storage Service User Guide*.
   + Choose a custom pool, if any are available. You configure custom tape pools to use either **Deep Archive Pool** or **Glacier Pool**. Tapes are archived to the configured storage class when they are ejected by your backup software. 

   If you archive a tape in S3 Glacier Flexible Retrieval, you can move it to S3 Glacier Deep Archive later. For more information, see [Moving tapes to S3 Glacier Deep Archive storage class](moving-tapes-vtl.md).
**Note**  
Tapes created before March 27, 2019, are archived directly in S3 Glacier Flexible Retrieval when your backup software ejects them.

1. (Optional) For **Tags**, choose **Add new tag** and enter a key and value to add tags to your tape. A tag is a case-sensitive key-value pair that helps you manage, filter, and search for your tapes. 

1. Choose **Create tapes**.

1. In the navigation pane, choose **Tape Library > Tapes** to see your tapes. By default, this list displays up to 1,000 tapes at a time, but the searches that you perform apply to all of your tapes. You can use the search bar to find tapes that match a specific criteria, or to reduce the list to less than 1,000 tapes. When your list contains 1,000 tapes or fewer, you can then sort your tapes in ascending or descending order by various properties.

The status of the virtual tapes is initially set to **CREATING** when the virtual tapes are being created. After the tapes are created, their status changes to **AVAILABLE**. For more information, see [Understanding Tape Status](understand-tapes-status.md).

# Allowing Automatic Tape Creation
<a name="CreateTapesAutomatically"></a>

 The Tape Gateway can automatically create new virtual tapes to maintain the minimum number of available tapes that you configure. It then makes these new tapes available for import by the backup application so that your backup jobs can run without interruption. Allowing automatic tape creation removes the need for custom scripting in addition to the manual process of creating new virtual tapes.

The Tape Gateway spawns a new tape automatically when it has fewer tapes than the minimum number of available tapes specified for automatic tape creation. A new tape is spawned when:
+ A tape is imported from an import/export slot.
+ A tape is imported to the tape drive.

The gateway maintains a minimum number of tapes with the barcode prefix specified in the automatic tape creation policy. If there are fewer tapes than the minimum number of tapes with the barcode prefix, the gateway automatically creates enough new tapes to equal the minimum number of tapes specified in the automatic tape creation policy.

When you eject a tape and it goes into the import/export slot, that tape does not count toward the minimum number of tapes specified in your automatic tape creation policy. Only tapes in the import/export slot are counted as being "available." Exporting a tape does not initiate automatic tape creation. Only imports affect the number of available tapes.

Moving a tape from the import/export slot to a tape drive or storage slot reduces the number of tapes in the import/export slot with the same barcode prefix. The gateway creates new tapes to maintain the minimum number of available tapes for that barcode prefix.

**To allow automatic tape creation**

1. Open the Storage Gateway console at [https://console.aws.amazon.com/storagegateway/home](https://console.aws.amazon.com/storagegateway/).

1. In the navigation pane, choose the **Gateways** tab.

1. Choose the gateway that you want to automatically create tapes for.

1. In the **Actions** menu, choose **Configure tape auto-create**. 

   The **Tape auto-create** page appears. You can add, change, or remove tape auto-create options here.

1. To allow automatic tape creation, choose **Add new item** then configure the settings for automatic tape creation. 

1. For **Tape type**, choose **Standard** to create standard virtual tapes. Choose **WORM** to create *write-once-read-many* (WORM) virtual tapes. For more information, see [Write Once, Read Many (WORM) Tape Protection ](https://docs.aws.amazon.com/storagegateway/latest/tgw/GettingStartedCreateTapes.html#WORM).

1. For **Minimum number of tapes**, enter the minimum number of virtual tapes that should be available on the Tape Gateway at all times. The valid range for this value is a minimum of 1 and a maximum of 10. 

1. For **Capacity**, enter the size, in bytes, of the virtual tape capacity. The valid range is a minimum of 100 GiB and a maximum of 15 TiB.

1. For **Barcode prefix**, enter the prefix that you want to prepend to the barcode of your virtual tapes.
**Note**  
Virtual tapes are uniquely identified by a barcode, and you can add a prefix to the barcode. The prefix is optional, but you can use it to help identify your virtual tapes. The prefix must be uppercase letters (A–Z) and must be one to four characters long.

1. For **Pool**, choose **Glacier Pool**, **Deep Archive Pool**, or a custom pool that you have created. The pool determines the storage class in which your tape is stored when it is ejected by your backup software. 
   + Choose **Glacier Pool** if you want to archive the tape in the S3 Glacier Flexible Retrieval storage class. When your backup software ejects the tape, it is automatically archived in S3 Glacier Flexible Retrieval. You use S3 Glacier Flexible Retrieval for more active archives, where you can retrieve a tape typically within 3-5 hours. For more information, see [Storage classes for archiving objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-glacier) in the *Amazon Simple Storage Service User Guide*.
   + Choose **Deep Archive Pool** if you want to archive the tape in the S3 Glacier Deep Archive storage class. When your backup software ejects the tape, the tape is automatically archived in S3 Glacier Deep Archive. You use S3 Glacier Deep Archive for long-term data retention and digital preservation, where data is accessed once or twice a year. You can retrieve a tape archived in S3 Glacier Deep Archive typically within 12 hours. For more information, see [Storage classes for archiving objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-glacier) in the *Amazon Simple Storage Service User Guide*.
   + Choose a custom pool, if any are available. You configure custom tape pools to use either **Deep Archive Pool** or **Glacier Pool**. Tapes are archived to the configured storage class when they are ejected by your backup software. 

   If you archive a tape in S3 Glacier Flexible Retrieval, you can move it to S3 Glacier Deep Archive later. For more information, see [Moving tapes to S3 Glacier Deep Archive storage class](moving-tapes-vtl.md).
**Note**  
Tapes created before March 27, 2019, are archived directly in S3 Glacier Flexible Retrieval when your backup software ejects them.

1. When finished configuring settings, choose **Save changes**.

1. In the navigation pane, choose **Tape Library > Tapes** to see your tapes. By default, this list displays up to 1,000 tapes at a time, but the searches that you perform apply to all of your tapes. You can use the search bar to find tapes that match a specific criteria, or to reduce the list to less than 1,000 tapes. When your list contains 1,000 tapes or fewer, you can then sort your tapes in ascending or descending order by various properties.

   The status of available virtual tapes is initially set to **CREATING** when the tapes are being created. After the tapes are created, their status changes to **AVAILABLE**. For more information, see [Understanding Tape Status](understand-tapes-status.md).

   For more information about changing automatic tape creation policies, or deleting automatic tape creation from a Tape Gateway, see [Managing Automatic Tape Creation](managing-automatic-tape-creation.md).

**Next Step**

[Using Your Tape Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/GettingStarted-create-tape-gateway.html)

# Creating a Custom Tape Pool
<a name="CreatingCustomTapePool"></a>

This section describes how to create a new custom tape pool in AWS Storage Gateway. 

**Topics**
+ [

## Choosing a Tape Pool Type
](#ChoosingTapePoolType)
+ [

## Using Tape Retention Lock
](#TapeRetentionLock)
+ [

## Creating a Custom Tape Pool
](#CreatingCustomTapePools)

## Choosing a Tape Pool Type
<a name="ChoosingTapePoolType"></a>

AWS Storage Gateway uses tape pools to determine the storage class that you want tapes to be archived in when they are ejected. Storage Gateway provides two standard tape pools:
+ **Glacier Pool** – Archives the tape in the S3 Glacier Flexible Retrieval storage class. When your backup software ejects the tape, it is automatically archived in S3 Glacier Flexible Retrieval. You use S3 Glacier Flexible Retrieval for more active archives, where you can retrieve the tapes typically within 3-5 hours. For more information, see [Storage classes for archiving objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html#sc-glacier) in the *Amazon Simple Storage Service User Guide*. 
+ **Deep Archive Pool** – Archives the tape in the S3 Glacier Deep Archive storage class. When your backup software ejects the tape, the tape is automatically archived in S3 Glacier Deep Archive. You use S3 Glacier Deep Archive for long-term data retention and digital preservation, where data is accessed once or twice a year. You can retrieve tapes archived in S3 Glacier Deep Archive typically within 12 hours. For detailed information, see [Storage classes for archiving objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html#sc-glacier) in the *Amazon Simple Storage Service User Guide*.

If you archive a tape in S3 Glacier Flexible Retrieval, you can move it to S3 Glacier Deep Archive later. For more information, see [Moving tapes to S3 Glacier Deep Archive storage class](moving-tapes-vtl.md).

Storage Gateway also supports creation of custom tape pools, which allow you to activate tape retention lock to prevent archived tapes from being deleted or moved to another pool for a fixed amount of time, up to 100 years. This includes locking permission controls on who can delete tapes or modify retention settings.

## Using Tape Retention Lock
<a name="TapeRetentionLock"></a>

With tape retention lock, you can lock archived tapes. Tape retention lock is an option for tapes in a custom tape pool. Tapes that have tape retention lock activated can't be deleted or moved to another pool for a fixed amount of time, up to 100 years.

You can configure tape retention lock in one of two modes:
+ **Governance mode** – When configured in governance mode, only AWS Identity and Access Management (IAM) users with the permissions to perform `storagegateway:BypassGovernanceRetention` can remove tapes from the pool. If you're using the AWS Storage Gateway API to remove the tape, you must also set `BypassGovernanceRetention` to `true`.
+ **Compliance mode** – When configured in compliance mode, the protection cannot be removed by any user, including the root AWS account. 

  When a tape is locked in compliance mode, its retention lock type can't be changed, and its retention period can't be shortened. The compliance mode lock type helps ensure that a tape can't be overwritten or deleted for the duration of the retention period.

**Important**  
A custom pool’s configuration cannot be changed after it is created.

You can activate tape retention lock when you create a custom tape pool. Any new tapes that are attached to a custom pool inherit the retention lock type, period, and storage class for that pool.

You can also activate tape retention lock on tapes that were archived before the release of this feature by moving tapes between the default pool and a custom pool that you create. If the tape is archived, the tape retention lock is effective immediately.

**Note**  
If you're moving archived tapes between the S3 Glacier Flexible Retrieval and S3 Glacier Deep Archive storage classes, you are charged a fee for moving a tape. There is no additional charge to move a tape from a default pool to a custom pool if the storage class remains the same.

## Creating a Custom Tape Pool
<a name="CreatingCustomTapePools"></a>

Use the following steps to create a custom tape pool using the AWS Storage Gateway console. 

**To create a custom tape pool**

1. Open the Storage Gateway console at [https://console.aws.amazon.com/storagegateway/home](https://console.aws.amazon.com/storagegateway/).

1. In the left navigation pane, choose the **Tape Library** tab, and then choose the **Pools** tab.

1. Choose **Create pool** to open the **Create pool** pane.

1. For **Name**, enter a unique name to identify your custom tape pool. The pool name must be between 2 and 100 characters long.

1. For **Storage class**, choose **Glacier** or **Glacier Deep Archive**.

1. For **Retention lock type**, choose **None**, **Compliance**, or **Governance**.
**Note**  
If you choose **Compliance**, tape retention lock cannot be removed by any user, including the root AWS account.

1. If you choose a tape retention lock type, enter the **Retention period** in days. The maximum retention period is 36,500 days (100 years).

1. (Optional) For **Tags**, choose **Add new tag** to add a tag to your custom tape pool. A tag is a case-sensitive key-value pair that helps you manage, filter, and search for your custom tape pools. 

   Enter a **Key**, and optionally, a **Value** for your tag. You can add up to 50 tags to the tape pool. 

1. Choose **Create pool** to create your new custom tape pool.

# Connecting your VTL devices
<a name="GettingStartedAccessTapesVTL"></a>

Following, you can find instructions about how to connect your virtual tape library (VTL) devices to your Microsoft Windows or Red Hat Enterprise Linux (RHEL) client.

**Topics**
+ [

## Connecting to a Microsoft Windows Client
](#iscsi-vtl-windows)
+ [

## Connecting to a Linux Client
](#iscsi-vtl-linux)

## Connecting to a Microsoft Windows Client
<a name="iscsi-vtl-windows"></a>

The following procedure shows a summary of the steps that you follow to connect to a Windows client.

**To connect your VTL devices to a Windows client**

1. Start `iscsicpl.exe`.
**Note**  
You must have administrator rights on the client computer to run the iSCSI initiator.

1. Start the Microsoft iSCSI initiator service.

1. In the **iSCSI Initiator Properties** dialog box, choose the **Discovery** tab, and then choose **Discover Portal**.

1. Provide the IP address of your Tape Gateway for **IP address or DNS name**.

1. Choose the **Targets** tab, and then choose **Refresh**. All 10 tape drives and the medium changer appear in the **Discovered targets** box. The status for the targets is **Inactive**.

1. Choose the first device and connect it. You connect the devices one at a time. 

1. Connect all of the targets.

On a Windows client, the driver provider for the tape drive must be Microsoft. Use the following procedure to verify the driver provider, and update the driver and provider if necessary:

**To verify and update the driver and provider**

1. On your Windows client, start Device Manager.

1. Expand **Tape drives**, open the context (right-click) menu for a tape drive, and choose **Properties**.

1. In the **Driver** tab of the **Device Properties** dialog box, verify **Driver Provider** is Microsoft.

1. If **Driver Provider** is not Microsoft, set the value as follows:

   1. Choose **Update Driver**.

   1. In the **Update Driver Software** dialog box, choose **Browse my computer for driver software**.

   1. In the **Update Driver Software** dialog box, choose **Let me pick from a list of device drivers on my computer**.

   1. Choose **LTO Tape drive** and choose **Next**. 

1. Choose **Close** to close the **Update Driver Software** window, and verify that the **Driver Provider** value is now set to Microsoft.

1.  Repeat the steps to update driver and provider for all the tape drives.

## Connecting to a Linux Client
<a name="iscsi-vtl-linux"></a>

The following procedure shows a summary of the steps that you follow to connect to an RHEL client.

**To connect a Linux client to VTL devices**

1. Install the `iscsi-initiator-utils` RPM package.

   You can use the following command to install the package.

   ```
   sudo yum install iscsi-initiator-utils
   ```

1. Make sure that the iSCSI daemon is running.

   For RHEL 8 or 9, use the following command.

   ```
   sudo service iscsid status
   ```

1. Discover the volume or VTL device targets defined for a gateway. Use the following discovery command.

   ```
   sudo /sbin/iscsiadm --mode discovery --type sendtargets --portal [GATEWAY_IP]:3260
   ```

   The output of the discovery command looks like the following example output.

   For Volume Gateways: `[GATEWAY_IP]:3260, 1 iqn.1997-05.com.amazon:myvolume `

   For Tape Gateways: `iqn.1997-05.com.amazon:[GATEWAY_IP]-tapedrive-01`

1. Connect to a target. 

   Be sure to specify the correct *[GATEWAY\$1IP]* and IQN in the connect command.

   Use the following command.

   ```
   sudo /sbin/iscsiadm --mode node --targetname iqn.1997-05.com.amazon:[ISCSI_TARGET_NAME] --portal [GATEWAY_IP]:3260,1 --login
   ```

1. Verify that the volume is attached to the client machine (the initiator). To do so, use the following command.

   ```
   ls -l /dev/disk/by-path
   ```

   The output of the command should look like the following example output.

   `lrwxrwxrwx. 1 root root 9 Apr 16 19:31 ip-[GATEWAY_IP]:3260-iscsi-iqn.1997-05.com.amazon:myvolume-lun-0 -> ../../sda`

   For Volume Gateways, we highly recommend that after you set up your initiator, you customize your iSCSI settings as discussed in [Customizing Your Linux iSCSI Settings](recommendediSCSISettings.md#CustomizeLinuxiSCSISettings).

   Verify that the VTL device is attached to the client machine (the initiator). To do so, use the following command.

   ```
   ls -l /dev/tape/by-path
   ```

   The output of the command should look like the following example output.

   ```
   total 0
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-mediachanger-lun-0-changer -> ../../sg20
   lrwxrwxrwx 1 root root 9 Sep 8 11:19 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-01-lun-0 -> ../../st6
   lrwxrwxrwx 1 root root 10 Sep 8 11:19 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-01-lun-0-nst -> ../../nst6
   lrwxrwxrwx 1 root root 9 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-02-lun-0 -> ../../st7
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-02-lun-0-nst -> ../../nst7
   lrwxrwxrwx 1 root root 9 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-03-lun-0 -> ../../st8
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-03-lun-0-nst -> ../../nst8
   lrwxrwxrwx 1 root root 9 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-04-lun-0 -> ../../st9
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-04-lun-0-nst -> ../../nst9
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-05-lun-0 -> ../../st10
   lrwxrwxrwx 1 root root 11 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-05-lun-0-nst -> ../../nst10
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-06-lun-0 -> ../../st11
   lrwxrwxrwx 1 root root 11 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-06-lun-0-nst -> ../../nst11
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-07-lun-0 -> ../../st12
   lrwxrwxrwx 1 root root 11 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-07-lun-0-nst -> ../../nst12
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-08-lun-0 -> ../../st13
   lrwxrwxrwx 1 root root 11 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-08-lun-0-nst -> ../../nst13
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-09-lun-0 -> ../../st14
   lrwxrwxrwx 1 root root 11 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-09-lun-0-nst -> ../../nst14
   lrwxrwxrwx 1 root root 10 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-10-lun-0 -> ../../st15
   lrwxrwxrwx 1 root root 11 Sep 8 11:20 ip-10.6.56.90:3260-iscsi-iqn.1997-05.com.amazon:sgw-9999999c-tapedrive-10-lun-0-nst -> ../../nst15
   lrwxrwxrwx 1 root root 9 Aug 19 10:15 pci-0000:12:00.0-fc-0x0000000000000012-lun-0-changer -> ../../sg6
   lrwxrwxrwx 1 root root 9 Aug 19 10:15 pci-0000:12:00.0-fc-0x000000000000001c-lun-0 -> ../../st0
   lrwxrwxrwx 1 root root 10 Aug 19 10:15 pci-0000:12:00.0-fc-0x000000000000001c-lun-0-nst -> ../../nst0
   lrwxrwxrwx 1 root root 9 Aug 19 10:15 pci-0000:12:00.0-fc-0x000000000000001f-lun-0 -> ../../st1
   lrwxrwxrwx 1 root root 10 Aug 19 10:15 pci-0000:12:00.0-fc-0x000000000000001f-lun-0-nst -> ../../nst1
   lrwxrwxrwx 1 root root 9 Aug 19 10:15 pci-0000:12:00.0-fc-0x0000000000000022-lun-0 -> ../../st2
   lrwxrwxrwx 1 root root 10 Aug 19 10:15 pci-0000:12:00.0-fc-0x0000000000000022-lun-0-nst -> ../../nst2
   lrwxrwxrwx 1 root root 9 Aug 19 10:15 pci-0000:12:00.1-fc-0x0000000000000025-lun-0 -> ../../st5
   lrwxrwxrwx 1 root root 10 Aug 19 10:15 pci-0000:12:00.1-fc-0x0000000000000025-lun-0-nst -> ../../nst5
   lrwxrwxrwx 1 root root 9 Aug 19 10:15 pci-0000:12:00.1-fc-0x0000000000000028-lun-0 -> ../../st3
   lrwxrwxrwx 1 root root 10 Aug 19 10:15 pci-0000:12:00.1-fc-0x0000000000000028-lun-0-nst -> ../../nst3
   lrwxrwxrwx 1 root root 9 Aug 19 10:15 pci-0000:12:00.1-fc-0x000000000000002b-lun-0 -> ../../st4
   lrwxrwxrwx 1 root root 10 Aug 19 10:15 pci-0000:12:00.1-fc-0x000000000000002b-lun-0-nst -> ../../nst4
   ```

**Next Step**

[Using Your Backup Software to Test Your Gateway Setup](https://docs.aws.amazon.com/storagegateway/latest/tgw/GettingStartedTestGatewayVTL.html)

# Using your backup software to test your gateway setup
<a name="GettingStartedTestGatewayVTL"></a>

You test your Tape Gateway setup by performing the following tasks using your backup application:

1. Configure the backup application to detect your storage devices.
**Note**  
To improve I/O performance, we recommend setting the block size of the tape drives in your backup application to 1 MB For more information, see [Use a Larger Block Size for Tape Drives](Performance.md#block-size).

1. Back up data to a tape.

1. Archive the tape.

1. Retrieve the tape from the archive.

1. Restore data from the tape. 

To test your setup, use a compatible backup application, as described following.

**Note**  
Unless otherwise stated, all backup applications were qualified on Microsoft Windows. 

For more information about compatible backup applications, see [Supported third-party backup applications for a Tape Gateway](Requirements.md#requirements-backup-sw-for-vtl).

**Topics**
+ [Testing your setup by using Arcserve Backup](backup-arcserve.md)
+ [Testing Your Setup by Using Bacula Enterprise](backup-bacula.md)
+ [Testing Your Setup by Using Commvault](backup-commvault.md)
+ [Testing Your Setup by Using Dell EMC NetWorker](backup-emc.md)
+ [Testing Your Setup by Using IBM Data Protect](backup-tsm.md)
+ [Testing your setup by using OpenText Data Protector](backup-hpdataprotector.md)
+ [Testing your setup by using Microsoft System Center DPM](backup-DPM.md)
+ [Testing your setup by using NovaStor DataCenter](backup-novastor.md)
+ [Testing your setup by using Quest NetVault Backup](backup-netvault.md)
+ [Testing your setup by using Veeam Backup and Replication](backup-Veeam.md)
+ [Testing Your Setup by Using Veritas Backup Exec](backup-BackupExec.md)
+ [Testing Your Setup by Using Veritas NetBackup](backup_netbackup-vtl.md)

# Testing your setup by using Arcserve Backup
<a name="backup-arcserve"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using Arcserve Backup. In this topic, you can find basic documentation to configure Arcserve Backup with a Tape Gateway and perform a backup and restore operation. For detailed information about to use Arcserve Backup, refer to the Arcserve Backup documentation.

**Topics**
+ [

## Configuring Arcserve to Work with VTL Devices
](#archServe-configure-software)
+ [

## Loading Tapes into a Media Pool
](#archServe-load-tapes)
+ [

## Backing Up Data to a Tape
](#archServe-backup-data)
+ [

## Archiving a Tape
](#archServe-archive-tape)
+ [

## Restoring Data from a Tape
](#archServe-restore-tape)

## Configuring Arcserve to Work with VTL Devices
<a name="archServe-configure-software"></a>

After you have connected your virtual tape library (VTL) devices to your client, you scan for your devices.

**To scan for VTL devices**

1. In the Arcserve Backup Manager, choose the **Utilities** menu.

1. Choose **Media Assure and Scan**.

## Loading Tapes into a Media Pool
<a name="archServe-load-tapes"></a>

When the Arcserve software connects to your gateway and your tapes become available, Arcserve automatically loads your tapes. If your gateway is not found in the Arcserve software, try restarting the tape engine in Arcserve.

**To restart the tape engine**

1. Choose **Quick Start**, choose **Administration**, and then choose **Device**.

1. On the navigation menu, open the context (right-click) menu for your gateway and choose an import/export slot.

1. Choose **Quick Import** and assign your tape to an empty slot.

1. Open the context (right-click) menu for your gateway and choose **Inventory/Offline Slots**.

1. Choose **Quick Inventory** to retrieve media information from the database.

If you add a new tape, you need to scan your gateway for the new tape to have it appear in Arcserve. If the new tapes don't appear, you must import the tapes.

**To import tapes**

1. Choose the **Quick Start** menu, choose **Back up**, and then choose **Destination tap**.

1. Choose your gateway, open the context (right-click) menu for one tape, and then choose **Import/Export Slot**.

1. Open the context (right-click) menu for each new tape and choose **Inventory**.

1. Open the context (right-click) menu for each new tape and choose **Format**.

Each tape's barcode now appears in your Storage Gateway console, and each tape is ready to use.

## Backing Up Data to a Tape
<a name="archServe-backup-data"></a>

When your tapes have been loaded into Arcserve, you can back up data. The backup process is the same as backing up physical tapes.

**To back up data to a tape**

1. From the **Quick Start** menu, open the restore a backup session.

1. Choose the **Source** tab, and then choose the file system or database system that you want to back up.

1. Choose the **Schedule** tab and choose the repeat method you want to use.

1. Choose the **Destination** tab and then choose the tape you want to use. If the data you are backing up is larger than the tape can hold, Arcserve prompts you to mount a new tape.

1. Choose **Submit** to back up your data.

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job might fail. To complete the failed backup job, you must resubmit it.

## Archiving a Tape
<a name="archServe-archive-tape"></a>

When you archive a tape, your Tape Gateway moves the tape from the tape library to the offline storage. Before you eject and archive a tape, you might want to check the content on it.

**To archive a tape**

1. From the **Quick Start** menu, open the restore a backup session.

1. Choose the **Source** tab, and then choose the file system or database system you want to back up.

1. Choose the **Schedule** tab and choose the repeat method you want to use.

1. Choose your gateway, open the context (right-click) menu for one tape, and then choose **Import/Export Slot**.

1. Assign a mail slot to load the tape. The status in the Storage Gateway console changes to **Archive**. The archive process might take some time.

The archiving process can take some time to complete. The initial status of the tape appears as **IN TRANSIT TO VTS**. When archiving starts, the status changes to **ARCHIVING**. When archiving is completed, the tape is no longer listed in the VTL but is archived in S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive.

## Restoring Data from a Tape
<a name="archServe-restore-tape"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use Arcserve to restore the data. This process is the same as restoring data from physical tapes. For instructions, refer to the Arcserve Backup documentation.

To restore data from a tape, use the following procedure.

**To restore data from a tape**

1. From the **Quick Start** menu, open the restore a restore session.

1. Choose the **Source** tab, and then choose the file system or database system you want to restore.

1. Choose the **Destination** tab and accept the default settings.

1. Choose the **Schedule** tab, choose the repeat method that you want to use, and then choose **Submit**.

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Testing Your Setup by Using Bacula Enterprise
<a name="backup-bacula"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using Bacula Enterprise. In this topic, you can find basic documentation on how to configure the Bacula version 10 backup application for a Tape Gateway and perform backup and restore operations. For detailed information about how to use Bacula, see [Bacula Systems Manuals and Documentation](https://www.baculasystems.com/bacula-systems-documentation-datasheet) or contact Bacula Systems.

**Note**  
Bacula is only supported on Linux.

## Setting Up Bacula Enterprise
<a name="bacular-setup"></a>

After you have connected your virtual tape library (VTL) devices to your Linux client, you configure the Bacula software to recognize your devices. For information about how to connect VTL devices to your client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

**To set up Bacula**

1. Get a licensed copy of the Bacula Enterprise backup software from Bacula Systems.

1. Install the Bacula Enterprise software on your on-premises or in-cloud computer. 

   For information about how to get the installation software, see [Enterprise Backup for Amazon S3 and Storage Gateway](https://www.baculasystems.com/corporate-data-backup-software-solutions/enterprise-backup-for-amazon-s3). For additional installation guidance, see the Bacula whitepaper [Using Cloud Services and Object Storage with Bacula Enterprise Edition](https://www.baculasystems.com/wp-content/uploads/ObjectStorage_Bacula_Enterprise.pdf).

## Configuring Bacula to Work with VTL Devices
<a name="bacula-configure"></a>

Next, configure Bacula to work with your VTL devices. Following, you can find basic configuration steps.

**To configure Bacula**

1. Install the Bacula Director and the Bacula Storage daemon. For instructions, see chapter 7 of the [Using Cloud Services and Object Storage with Bacula Enterprise Edition](https://www.baculasystems.com/wp-content/uploads/ObjectStorage_Bacula_Enterprise.pdf) Bacula white paper.

1. Connect to the system that is running Bacula Director and configure the iSCSI initiator. To do so, use the script provided in step 7.4 in the [Using Cloud Services and Object Storage with Bacula Enterprise Edition](https://www.baculasystems.com/wp-content/uploads/ObjectStorage_Bacula_Enterprise.pdf) Bacula whitepaper.

1. Configure the storage devices. Use the script provided in the Bacula whitepaper discussed preceding.

1. Configure the local Bacula Director, add storage targets, and define media pools for your tapes. Use the script provided in the Bacula whitepaper discussed preceding.

## Backing Up Data to Tape
<a name="bacula-backup-data"></a>

1. Create tapes in the Storage Gateway console. For information on how to create tapes, see [Creating Tapes](https://docs.aws.amazon.com/storagegateway/latest/tgw/GettingStartedCreateTapes.html).

1. Transfer tapes from the I/E slot to the storage slot by using the following command.

   `/opt/bacula/scripts/mtx-changer`

   For example, the following command transfers tapes from I/E slot 1601 to storage slot 1.

   `/opt/bacula/scripts/mtx-changer transfer 1601 1`

1. Launch the Bacula console by using the following command.

   `/opt/bacula/bin/bconsole`
**Note**  
When you create and transfer a tape to Bacula, use the Bacula console (bconsole) command `update slots storage=VTL` so that Bacula knows about the new tapes that you created.

1. Label the tape with the barcode as the volume name or label by using the following bconsole command.

   `label storage=VTL pool=pool.VTL barcodes === label the tapes with the barcode as the volume name / label`

1. Mount the tape by using the following command.

   `mount storage=VTL slot=1 drive=0`

1. Create a backup job that uses the media pools you created, and then write data to the virtual tape by using the same procedures that you do with physical tapes. 

1. Unmount the tape from the Bacula console by using the following command.

   `umount storage=VTL slot=1 drive=0`

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job will fail, and the tape status in Bacula Enterprise will change to **FULL**. If you know the tape has not been fully utilized, you can manually change the tape status back to **APPEND** and continue the backup job using the same tape. You can also continue the job on a different tape if other tapes in **APPEND** status are available.

## Archiving a Tape
<a name="bacula-archive-tape"></a>

When all backup jobs for a particular tape are done and you can archive the tape, use the mtx-changer script to move the tape from the storage slot to the I/E slot. This action is similar to the eject action in other backup applications.

**To archive a tape**

1. Transfer the tape from the storage slot to the I/E slot by using the `/opt/bacula/scripts/mtx-changer` command. 

   For example, the following command transfers a tape from the storage slot 1 to I/E slot 1601. 

   `/opt/bacula/scripts/mtx-changer transfer 1 1601`

1. Verify that the tape is archived in the offline storage (S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive) and that the tape has the status **Archived**.

## Restoring Data from an Archived and Retrieved Tape
<a name="bacula-retrieve-from-archive"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape from archive to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Restore your data by using the Bacula software: 

   1. Import the tapes into the storage slot by using the `/opt/bacula/scripts/mtx-changer` command to transfer tapes from the I/E slot.

      For example, the following command transfers tapes from I/E slot 1601 to storage slot 1.

       `/opt/bacula/scripts/mtx-changer transfer 1601 1`

   1. Use the Bacula console to update the slots, and then mount the tape.

   1. Run the restore command to restore your data. For instructions, see the Bacula documentation.

# Testing Your Setup by Using Commvault
<a name="backup-commvault"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using Commvault. In this topic, you can find basic documentation on how to configure the Commvault backup application for a Tape Gateway, perform a backup archive, and retrieve your data from archived tapes. For detailed information about how to use Commvault, refer to the Commvault documentation.

**Topics**
+ [

## Configuring Commvault to Work with VTL Devices
](#commvault-configure-software)
+ [

## Creating a Storage Policy and a Subclient
](#commvault-prepare-tapes)
+ [

## Backing Up Data to a Tape in Commvault
](#commvault-backup-data)
+ [

## Archiving a Tape in Commvault
](#commvault-archive-tape)
+ [

## Restoring Data from a Tape
](#commvault-restore-data)

## Configuring Commvault to Work with VTL Devices
<a name="commvault-configure-software"></a>

After you connect the VTL devices to the Windows client, you configure Commvault to recognize them. For information about how to connect VTL devices to the Windows client, see [Connecting your VTL devices to a Windows client](ConfiguringiSCSIClient-vtl.md). 

The Commvault backup application doesn't automatically recognize VTL devices. You must manually add devices to expose them to the Commvault backup application and then discover the devices. 

**To configure Commvault**

1. In the CommCell console main menu, choose **Storage**, and then choose** Expert Storage Configuration** to open the **Select MediaAgents** dialog box.

1. Choose the available media agent you want to use, choose **Add**, and then choose **OK**.

1. In the **Expert Storage Configuration** dialog box, choose **Start**, and then choose **Detect/Configure Devices**.

1. Leave the **Device Type** options selected, choose **Exhaustive Detection**, and then choose **OK**.

1. In the **Confirm Exhaustive Detection** confirmation box, choose **Yes**.

1. In the **Device Selection** dialog box, choose your library and all its drives, and then choose **OK**. Wait for your devices to be detected, and then choose **Close** to close the log report.

1. Right-click your library, choose **Configure**, and then choose **Yes**. Close the configuration dialog box.

1. In the **Does this library have a barcode reader?** dialog box, choose **Yes**, and then for device type, choose **IBM ULTRIUM V5**.

1. In the CommCell browser, choose **Storage Resources**, and then choose **Libraries** to see your tape library.

1. To see your tapes in your library, open the context (right-click) menu for your library, and then choose **Discover Media**, **Media location**, **Media Library**.

1. To mount your tapes, open the context (right-click) menu for your media, and then choose **Load**.

## Creating a Storage Policy and a Subclient
<a name="commvault-prepare-tapes"></a>

Every backup and restore job is associated with a storage policy and a subclient policy. 

A storage policy maps the original location of the data to your media.

**To create a storage policy**

1. In the CommCell browser, choose **Policies**.

1. Open the context (right-click) menu for **Storage Policies**, and then choose **New Storage Policy**.

1. In the Create Storage Policy wizard, choose **Data Protection and Archiving**, and then choose **Next**.

1. Type a name for **Storage Policy Name**, and then choose **Incremental Storage Policy**. To associate this storage policy with incremental loads, choose one of the options. Otherwise, leave the options unchecked, and then choose **Next**.

1. In the **Do you want to Use Global Deduplication Policy?** dialog box, choose your **Deduplication** preference, and then choose **Next**.

1. From **Library for Primary Copy**, choose your VTL library, and then choose **Next**.

1. Verify that your media agent settings are correct, and then choose **Next**.

1. Verify that your scratch pool settings are correct, and then choose **Next**.

1. Configure your retention policies in **iData Agent Backup data**, and then choose **Next**.

1. Review the encryption settings, and then choose **Next**.

1. To see your storage policy, choose **Storage Policies**.

You create a subclient policy and associate it with your storage policy. A subclient policy allows you to configure similar file system clients from a central template, so that you don't have to set up many similar file systems manually.

**To create a subclient policy**

1. In the CommCell browser, choose **Client Computers**, and then choose your client computer. Choose **File System**, and then choose **defaultBackupSet**.

1. Right-click **defaultBackupSet**, choose **All Tasks**, and then choose **New Subclient**.

1. In the **Subclient** properties box, type a name in **SubClient Name**, and then choose **OK**.

1. Choose **Browse**, navigate to the files that you want to back up, choose **Add**, and then close the dialog box.

1. In the **Subclient** property box, choose the **Storage Device** tab, choose a storage policy from **Storage policy**, and then choose **OK**.

1. In the **Backup Schedule** window that appears, associate the new subclient with a backup schedule. 

1. Choose **Do Not Schedule** for one time or on-demand backups, and then choose **OK**.

   You should now see your subclient in the **defaultBackupSet** tab.

## Backing Up Data to a Tape in Commvault
<a name="commvault-backup-data"></a>

You create a backup job and write data to a virtual tape by using the same procedures you use with physical tapes. For more information, refer to the Commvault documentation.

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job might fail. In some cases, you can select an option to resume the failed job. Otherwise, you must submit a new job. If Commvault marks the tape as unusable after a job fails, you must reload the tape into the drive to continue writing to it. If multiple tapes are available, Commvault might continue the failed backup job on a different tape.

## Archiving a Tape in Commvault
<a name="commvault-archive-tape"></a>

You start the archiving process by ejecting the tape. When you archive a tape, Tape Gateway moves the tape from the tape library to offline storage. Before you eject and archive a tape, you might want to first check the content on the tape. 

**To archive a tape**

1. In the CommCell browser, choose **Storage Resources**, **Libraries**, and then choose **Your library**. Choose **Media By Location**, and then choose **Media In Library**.

1. Open the context (right-click) menu for the tape you want to archive, choose **All Tasks**, choose **Export**, and then choose **OK**.

The archiving process can take some time to complete. The initial status of the tape appears as **IN TRANSIT TO VTS**. When archiving starts, the status changes to **ARCHIVING**. When archiving is completed, the tape is no longer listed in the VTL.

In the Commvault software, verify that the tape is no longer in the storage slot.

In the navigation pane of the Storage Gateway console, choose **Tapes**. Verify that your archived tape's status is **ARCHIVED**. 

## Restoring Data from a Tape
<a name="commvault-restore-data"></a>

You can restore data from a tape that has never been archived and retrieved, or from a tape that has been archived and retrieved. For tapes that have never been archived and retrieved (nonretrieved tapes), you have two options to restore the data:
+ Restore by subclient
+ Restore by job ID

**To restore data from a nonretrieved tape by subclient**

1. In the CommCell browser, choose **Client Computers**, and then choose your client computer. Choose **File System**, and then choose **defaultBackupSet.**

1. Open the context (right-click) menu for your subclient, choose **Browse and Restore**, and then choose **View Content**.

1. Choose the files you want to restore, and then choose **Recover All Selected**.

1. Choose **Home**, and then choose **Job Controller** to monitor the status of your restore job.

**To restore data from a nonretrieved tape by job ID**

1. In the CommCell browser, choose **Client Computers**, and then choose your client computer. Right-click **File System**, choose **View**, and then choose **Backup History**.

1. In the **Backup Type** category, choose the type of backup jobs you want, and then choose **OK**. A tab with the history of backup jobs appears.

1. Find the **Job ID** you want to restore, right-click it, and then choose **Browse and Restore**.

1. In the **Browse and Restore Options** dialog box, choose **View Content**.

1. Choose the files that you want to restore, and then choose **Recover All Selected**.

1. Choose **Home**, and then choose **Job Controller** to monitor the status of your restore job.

**To restore data from an archived and retrieved tape**

1. In the CommCell browser, choose **Storage Resources**, choose **Libraries**, and then choose **Your library**. Choose **Media By Location**, and then choose **Media In Library**.

1. Right-click the retrieved tape, choose **All Tasks**, and then choose** Catalog.** 

1. In the **Catalog Media** dialog box, choose **Catalog only**, and then choose **OK**.

1. Choose **CommCell Home**, and then choose **Job Controller** to monitor the status of your restore job.

1. After the job succeeds, open the context (right-click) menu for your tape, choose **View**, and then choose **View Catalog Contents**. Take note of the **Job ID** value for use later.

1. Choose **Recatalog/Merge**. Make sure that **Merge only** is chosen in the **Catalog Media** dialog box.

1. Choose **Home**, and then choose **Job Controller** to monitor the status of your restore job.

1. After the job succeeds, choose **CommCell Home**, choose **Control Panel**, and then choose **Browse/Search/Recovery**.

1. Choose **Show aged data during browse and recovery**, choose **OK**, and then close the **Control Panel**. 

1. In the CommCell browser, right-click **Client Computers**, and then choose your client computer. Choose **View**, and then choose **Job History**.

1. In the **Job History Filter** dialog box, choose **Advanced**.

1. Choose **Include Aged Data**, and then choose **OK**.

1. In the **Job History** dialog box, choose **OK** to open the **history of jobs** tab.

1. Find the job that you want to restore, open the context (right-click) menu for it, and then choose **Browse and Restore**.

1. In the **Browse and Restore** dialog box, choose **View Content**.

1. Choose the files that you want to restore, and then choose **Recover All Selected.**

1. Choose **Home**, and then choose **Job Controller** to monitor the status of your restore job.

# Testing Your Setup by Using Dell EMC NetWorker
<a name="backup-emc"></a>

You can back up your data to virtual tapes, archive the tapes and manage your virtual tape library (VTL) devices by using Dell EMC NetWorker. In this topic, you can find basic documentation on how to configure the Dell EMC NetWorker software to work with a Tape Gateway and perform a backup, including how to configure storage devices, write data to a tape, archive a tape and restore data from a tape. 

For detailed information about how to install and use the Dell EMC NetWorker software, see the NetWorker documentation.

For more information about compatible backup applications, see [Supported third-party backup applications for a Tape Gateway](Requirements.md#requirements-backup-sw-for-vtl).

**Topics**
+ [

## Configuring to Work with VTL Devices
](#emc-configure-software)
+ [

## Allowing Import of WORM Tapes into Dell EMC NetWorker
](#emc-import-tapes)
+ [

## Backing Up Data to a Tape in Dell EMC NetWorker
](#emc-write-data-to-tape)
+ [

## Archiving a Tape in Dell EMC NetWorker
](#emc-archive-tape)
+ [

## Restoring Data from an Archived Tape in Dell EMC NetWorker
](#emc-restore-tape)

## Configuring to Work with VTL Devices
<a name="emc-configure-software"></a>

After you have connected your virtual tape library (VTL) devices to your Microsoft Windows client, you configure to recognize your devices. For information about how to connect VTL devices to the Windows client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

 doesn't automatically recognize Tape Gateway devices. To expose your VTL devices to the NetWorker software and get the software to discover them, you manually configure the software. Following, we assume that you have correctly installed the software and that you are familiar with the Management Console. For more information about the Management Console, see the NetWorker Management Console interface section of the *[Dell EMC NetWorker Administration Guide](https://www.dellemc.com/en-us/collaterals/unauth/technical-guides-support-information/products/data-protection/docu91933.pdf)*.

**To configure the Dell EMC NetWorker software for VTL devices**

1. Start the Dell EMC NetWorker Management Console application, choose **Enterprise** from the menu, and then choose **localhost** from the left pane.

1. Open the context (right-click) menu for **localhost**, and then choose **Launch Application**.

1. Choose the **Devices** tab, open the context (right-click) menu for **Libraries**, and then choose **Scan for Devices**.

1. In the Scan for Devices wizard, choose **Start Scan**, and then choose **OK** from the dialog box that appears.

1. Expand the **Libraries** folder tree to see all your libraries and hit F5 to refresh. This process might take a few seconds to load the devices into the library.

1. Open a command window (cmd.exe) with admin privileges and run the `jbconfig` utility that is installed with Dell EMC NetWorker 19.5.

   1. At the menu prompt, enter the corresponding numeral to select **Configure an Autodetected SCSI Jukebox**.

   1. When prompted to provide a name for the jukebox device, enter a name such as `AWSVTL`.

   1. When prompted to turn NetWorker auto-cleaning on, enter `no`.

   1. When prompted to bypass auto-configure, enter `no`.

   1. When prompted to configure another jukebox, enter `no`.

1. When "jbconfig" completes, return to the Networker GUI and press F5 to refresh.

1. Choose your library to see your tapes in the left pane and the corresponding empty volume slots list in the right pane.

1. In the volume list, select the volumes you want to activate (selected volumes are highlighted), open the context (right-click) menu for the selected volumes, and then choose **Deposit**. This action moves the tape from the I/E slot into the volume slot.

1. In the dialog box that appears, choose **Yes**, and then in the **Load the Cartridges into** dialog box, choose **Yes**. 

1. If you don't have any more tapes to deposit, choose **No** or **Ignore**. Otherwise, choose **Yes** to deposit additional tapes.

## Allowing Import of WORM Tapes into Dell EMC NetWorker
<a name="emc-import-tapes"></a>

You are now ready to import tapes from your Tape Gateway into the Dell EMC NetWorker library.

The virtual tapes are write once read many (WORM) tapes, but Dell EMC NetWorker expects non-WORM tapes. For Dell EMC NetWorker to work with your virtual tapes, you must activate import of tapes into non-WORM media pools. 

**To allow import of WORM tapes into non-WORM media pools**

1. On NetWorker Console, choose **Media**, open the context (right-click) menu for **localhost**, and then choose **Properties**.

1.  In the **NetWorker Sever Properties** window, choose the **Configuration** tab.

1.  In the **Worm tape handling** section, clear the **WORM tapes only in WORM pools** box, and then choose **OK**.

## Backing Up Data to a Tape in Dell EMC NetWorker
<a name="emc-write-data-to-tape"></a>

Backing up data to a tape is a two-step process. 

1. Label the tapes you want to back up your data to, create the target media pool, and add the tapes to the pool.

   You create a media pool and write data to a virtual tape by using the same procedures you do with physical tapes. For detailed information, see the Backing Up Data section of the *[Dell EMC NetWorker Administration Guide](https://www.dellemc.com/en-us/collaterals/unauth/technical-guides-support-information/products/data-protection/docu91933.pdf)*.

1. Write data to the tape. You back up data by using the Dell EMC NetWorker User application instead of the Dell EMC NetWorker Management Console. The Dell EMC NetWorker User application installs as part of the NetWorker installation.

**Note**  
You use the Dell EMC NetWorker User application to perform backups, but you view the status of your backup and restore jobs in the EMC Management Console. To view status, choose the **Devices** menu and view the status in the **Log** window.

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job will be suspended, and the tape status in Dell EMC Networker will change to **Write Protected**. You can archive the tape or continue to read data from it. You can resume the suspended backup job on a different tape.

## Archiving a Tape in Dell EMC NetWorker
<a name="emc-archive-tape"></a>

When you archive a tape, Tape Gateway moves the tape from the Dell EMC NetWorker tape library to the offline storage. You begin tape archival by ejecting a tape from the tape drive to the storage slot. You then withdraw the tape from the slot to the archive by using your backup application—that is, the Dell EMC NetWorker software.

**To archive a tape by using Dell EMC NetWorker**

1. On the **Devices** tab in the NetWorker Administration window, choose **localhost** or your EMC server, and then choose **Libraries**.

1. Choose the library you imported from your virtual tape library.

1. From the list of tapes that you have written data to, open the context (right-click) menu for the tape you want to archive, and then choose **Eject/Withdraw**.

1. In the confirmation box that appears, choose **OK**.

The archiving process can take some time to complete. The initial status of the tape appears as **IN TRANSIT TO VTS**. When archiving starts, the status changes to **ARCHIVING**. When archiving is completed, the tape is no longer listed in the VTL.

In the Dell EMC NetWorker software, verify that the tape is no longer in the storage slot.

In the navigation pane of the Storage Gateway console, choose **Tapes**. Verify that your archived tape's status is **ARCHIVED**. 

## Restoring Data from an Archived Tape in Dell EMC NetWorker
<a name="emc-restore-tape"></a>

Restoring your archived data is a two-step process:

1. Retrieve the archived tape a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use the Dell EMC NetWorker software to restore the data. You do this by creating a restoring a folder file, as you do when restoring data from physical tapes. For instructions, see the Using the NetWorker User program section of the *[Dell EMC NetWorker Administration Guide](https://www.dellemc.com/en-us/collaterals/unauth/technical-guides-support-information/products/data-protection/docu91933.pdf)*.

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Testing Your Setup by Using IBM Data Protect
<a name="backup-tsm"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using IBM Data Protect with AWS Storage Gateway. (IBM Data Protect was formerly known as Tivoli Storage Manager.) 

This topic contains basic information about how to configure the IBM Data Protect backup software for a Tape Gateway. It also includes basic information about performing backup and restore operations with IBM Data Protect. For more information about how to administer IBM Data Protect backup software, refer to the IBM Data Protect documentation.

The IBM Data Protect backup software supports AWS Storage Gateway on the following operating systems.
+ **Microsoft Windows Server**
+ **Red Hat Linux**

For information about IBM Data Protect supported devices for Windows, see [IBM Data Protect (formerly Tivoli Storage Manager) Supported Devices for AIX, HP-UX, Solaris, and Windows](https://www.ibm.com/support/pages/node/716993).

For information about IBM Data Protect supported devices for Linux, see [IBM Data Protect (formerly Tivoli Storage Manager) Supported Devices for Linux](https://www.ibm.com/support/pages/node/716987).

**Topics**
+ [

## Setting Up IBM Data Protect
](#tsm-setup)
+ [

## Configuring IBM Data Protect to Work with VTL Devices
](#tsm-configure)
+ [

## Writing Data to a Tape in IBM Data Protect
](#tsm-write-data-to-tape)
+ [

## Restoring Data from a Tape Archived in IBM Data Protect
](#tsm-restore-tape)

## Setting Up IBM Data Protect
<a name="tsm-setup"></a>

After you connect your VTL devices to your client, you configure the IBM Data Protect software to recognize them. For more information about connecting VTL devices to your client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

**To set up IBM Data Protect**

1. Get a licensed copy of the IBM Data Protect software from IBM.

1. Install the IBM Data Protect software on your on-premises environment or in-cloud Amazon EC2 instance. For more information, see IBM's [Installing and upgrading](https://www.ibm.com/support/knowledgecenter/en/SSEQVQ_8.1.10/srv.common/t_installing_upgrading.html) documentation for IBM Data Protect. 

   For more information about configuring IBM Data Protect software, see [Configuring AWS Tape Gateway virtual tape libraries for an IBM Data Protect server](https://www.ibm.com/support/pages/node/6326793).

## Configuring IBM Data Protect to Work with VTL Devices
<a name="tsm-configure"></a>

Next, configure IBM Data Protect to work with your VTL devices. You can configure IBM Data Protect to work with VTL devices on Microsoft Windows Server or Red Hat Linux.

### Configuring IBM Data Protect for Windows
<a name="tsm-configure-windows"></a>

For complete instructions on how to configure IBM Data Protect on Windows, see [Tape Device Driver-W12 6266 for Windows 2012](https://datacentersupport.lenovo.com/us/en/products/storage/tape-and-backup/ts2240/6160/downloads/ds502099) on the Lenovo website. Following is basic documentation on the process.

**To configure IBM Data Protect for Microsoft Windows**

1. Get the correct driver package for your media changer. For the tape-device driver, IBM Data Protect requires version W12 6266 for Windows 2012. For instructions on how to get the drivers, see [Tape Device Driver-W12 6266 for Windows 2012](https://datacentersupport.lenovo.com/us/en/products/storage/tape-and-backup/ts2240/6160/downloads/ds502099) on the Lenovo website.
**Note**  
Make sure that you install the "non-exclusive" set of drivers.

1. On your computer, open **Computer Management**, expand** Media Changer devices**, and verify that the media changer type is listed as **IBM 3584 Tape Library**.

1. Ensure that the barcode for any tape in the virtual tape library is eight characters or less. If you try to assign your tape a barcode that is longer than eight characters, you get this error message: `"Tape barcode is too long for media changer"`.

1. Ensure that all your tape drives and media changer appear in IBM Data Protect. To do so, use the following command: `\Tivoli\TSM\server>tsmdlst.exe`

### Configure IBM Data Protect for Linux
<a name="tsm-configure-linux"></a>

Following is basic documentation on configuring IBM Data Protect to work with VTL devices on Linux.

**To configure IBM Data Protect for Linux**

1. Go to [IBM Fix Central](https://www.ibm.com/support/fixcentral/) on the IBM Support website, and choose **Select product**.

1. For **Product Group**, choose **System Storage**.

1. For **Select from System Storage**, choose **Tape systems**.

1. For **Tape systems**, choose **Tape drivers and software**.

1. For **Select from Tape drivers and software**, choose **Tape device drivers**.

1. For **Platform**, choose your operating system and choose **Continue**.

1. Choose the device driver version that you want to download. Then follow the instructions on the **Fix Central** download page to download and configure IBM Data Protect.

1. Ensure that the barcode for any tape in the virtual tape library is eight characters or less. If you try to assign your tape a barcode that is longer than eight characters, you get this error message: `"Tape barcode is too long for media changer"`.

## Writing Data to a Tape in IBM Data Protect
<a name="tsm-write-data-to-tape"></a>

You write data to a Tape Gateway virtual tape by using the same procedure and backup policies that you do with physical tapes. Create the necessary configuration for backup and restore jobs. For more information about configuring IBM Data Protect, see [Overview of administration tasks](https://www.ibm.com/support/knowledgecenter/en/SSEQVQ_8.1.10/srv.admin/t_administer_solution.html) for IBM Data Protect.

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job might fail. If the backup job fails, the tape status in IBM Data Protect changes to **ReadOnly**. If you know the tape has not been fully utilized, you can manually change the tape status back to **ReadWrite**, and either resume or resubmit the backup job using the same tape. IBM Data Protect might continue the failed backup job on a different tape if other tapes in **ReadWrite** status are available.

## Restoring Data from a Tape Archived in IBM Data Protect
<a name="tsm-restore-tape"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape from archive to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Restore the data by using the IBM Data Protect backup software. You do this by creating a recovery point, as you do when restoring data from physical tapes. For more information about configuring IBM Data Protect, see [Overview of administration tasks](https://www.ibm.com/support/knowledgecenter/en/SSEQVQ_8.1.10/srv.admin/t_administer_solution.html) for IBM Data Protect.

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Testing your setup by using OpenText Data Protector
<a name="backup-hpdataprotector"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using OpenText Data Protector. In this topic, you can find basic documentation on how to configure the OpenText Data Protector software for a Tape Gateway and perform a backup and restore operation. For detailed information about how to use the OpenText Data Protector software, see the OpenText Data Protector documentation. For more information about compatible backup applications, see [Supported third-party backup applications for a Tape Gateway](Requirements.md#requirements-backup-sw-for-vtl).

**Topics**
+ [

## Configuring OpenText Data Protector to Work with VTL Devices
](#hpdataprotector-configure-software)
+ [

## Preparing Virtual Tapes for Use with Data Protector
](#hpdataprotector-prepare-tapes)
+ [

## Loading Tapes into a Media Pool
](#hpdataprotector-load-tapes-into-media-pool)
+ [

## Backing Up Data to a Tape
](#hpdataprotector-backup-to-tape)
+ [

## Archiving a Tape
](#hpdataprotector-archive-tape)
+ [

## Restoring Data from a Tape
](#hpdataprotector-restore-tape)

## Configuring OpenText Data Protector to Work with VTL Devices
<a name="hpdataprotector-configure-software"></a>

After you have connected the virtual tape library (VTL) devices to the client, you configure OpenText Data Protector to recognize your devices. For information about how to connect VTL devices to the client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

The OpenText Data Protector software doesn't automatically recognize Tape Gateway devices. To have the software recognize these devices, manually add the devices and then discover the VTL devices, as described following.

**To add the VTL devices**

1. In the OpenText Data Protector main window, choose the **Devices & Media** shelf in the list at top left. 

   Open the context (right-click) menu for **Devices**, and choose **Add Device**.

1. On the **Add Device** tab, type a value for **Device Name**. For **Device Type**, choose **SCSI Library**, and then choose **Next**.

1. On the next screen, do the following:

   1. For **SCSI address of the library robotic**, select your specific address. 

   1. For **Select what action Data Protector should take if the drive is busy**, choose "Abort" or your preferred action. 

   1. Choose to activate these options:
      + **Barcode reader support**
      + **Automatically discover changed SCSI address**
      + **SCSI Reserve/Release (robotic control)**

   1. Leave **Use barcode as medium label on initialization** clear (unchecked), unless your system requires it. 

   1. Choose **Next** to continue.

1. On the next screen, specify the slots that you want to use with HP Data Protector. Use a hyphen ("-") between numbers to indicate a range of slots, for example 1–6. When you've specified slots to use, choose **Next**.

1. For the standard type of media used by the physical device, choose **LTO\$1Ultrium**, and then choose **Finish** to complete the setup. 

Your tape library is now ready to use. To load tapes into it, see the next section.

## Preparing Virtual Tapes for Use with Data Protector
<a name="hpdataprotector-prepare-tapes"></a>

Before you can back up data to a virtual tape, you need to prepare the tape for use. Doing this involves the following actions:
+ Load a virtual tape into a tape library
+ Load the virtual tape into a slot
+ Create a media pool
+ Load the virtual tape into media pool

In the following sections, you can find steps to guide you through this process. 

### Loading Virtual Tapes into a Tape Library
<a name="hpdataprotector-load-tapes-into-library"></a>

Your tape library should now be listed under **Devices**. If you don't see it, press F5 to refresh the screen. When your library is listed, you can load virtual tapes into the library.

**To load virtual tapes into your tape library**

1. Choose the plus sign next to your tape library to display the nodes for robotics paths, drives, and slots. 

1. Open the context (right-click) menu for **Drives**, choose **Add Drive**, type a name for your tape, and then choose **Next** to continue.

1. Choose the tape drive you want to add for **SCSI address of data drive**, choose **Automatically discover changed SCSI address**, and then choose **Next**.

1. On the following screen, choose **Advanced**. The **Advanced Options** pop-up screen appears.

   1. On the **Settings** tab, you should consider the following options:
      + **CRC Check** (to detect accidental data changes)
      + **Detect dirty drive** (to ensure the drive is clean before backup)
      + **SCSI Reserve/Release(drive)** (to avoid tape contention)

      For testing purposes, you can leave these options deactivated (unchecked).

   1.  On the **Sizes** tab, set the **Block size (kB)** to **Default (256)**. 

   1. Choose **OK** to close the advanced options screen, and then choose **Next** to continue.

1. On the next screen, choose these options under **Device Policies**:
   + **Device may be used for restore** 
   + **Device may be used as source device for object copy** 

1. Choose **Finish** to finish adding your tape drive to your tape library.

### Loading Virtual Tapes into Slots
<a name="hpdataprotector-load-tapes-into-library-slots"></a>

Now that you have a tape drive in your tape library, you can load virtual tapes into slots.

**To load a tape into a slot**

1. In the tape library tree node, open the node labeled **Slots**. Each slot has a status represented by an icon:
   + A green tape means that a tape is already loaded into the slot.
   + A gray slot means that the slot is empty.
   + A cyan question mark means that the tape in that slot is not formatted.

1. For an empty slot, open the context (right-click) menu, and then choose **Enter**. If you have existing tapes, choose one to load into that slot. 

### Creating a Media Pool
<a name="hpdataprotector-create-media-pool"></a>

A *media pool* is a logical group used to organize your tapes. To set up tape backup, you create a media pool.

**To create a media pool**

1. In the **Devices & Media** shelf, open the tree node for **Media**, open the context (right-click) menu for the **Pools** node, and then choose **Add Media Pool**.

1. For **Pool name**, type a name. 

1. For **Media Type**, choose **LTO\$1Ultrium**, and then choose **Next**.

1. On the following screen, accept the default values, and then choose **Next**. 

1. Choose **Finish** to finish creating a media pool.

## Loading Tapes into a Media Pool
<a name="hpdataprotector-load-tapes-into-media-pool"></a>

Before you can back up data onto your tapes, you must load the tapes into the media pool that you created.

**To load a virtual tape into a media pool**

1. On your tape library tree node, choose the **Slots** node. 

1. Choose a loaded tape, one that has a green icon showing a loaded tape. Open the context (right-click) menu and choose **Format**, and then choose **Next**. 

1. Choose the media pool you created, and then choose **Next**.

1. For **Medium Description**, choose **Use barcode**, and then choose **Next**.

1. For **Options**, choose **Force Operation**, and then choose **Finish**.

You should now see your chosen slot change from a status of unassigned (gray) to a status of tape inserted (green). A series of messages appear to confirm that your media is initialized. 

At this point, you should have everything configured to begin using your virtual tape library with Data Protector. To double-check that this is the case, use the following procedure.

**To verify that your tape library is configured for use**
+ Choose **Drives**, then open the context (right-click) menu for your drive, and choose **Scan**. 

If your configuration is correct, a message confirms that your media was successfully scanned.

## Backing Up Data to a Tape
<a name="hpdataprotector-backup-to-tape"></a>

When your tapes have been loaded into a media pool, you can back up data to them.

**To back up data to a tape**

1. Choose **Backup** from the drop-down menu at the top-left corner of the window.

1. Expand the **Backup** navigation tree from the left pane.

1. Right-click on **Filesystem** to open the context menu, and then choose **Add Backup**.

1. On the **Create New Backup** screen, under **Filesystem**, choose **Blank File System Backup**, and then choose **OK**.

1. On the tree node that shows your host system, select the file system or file systems that you want to back up, and choose **Next** to continue.

1. Open the tree node for the tape library you want to use, open the context (right-click) menu for the tape drive you want to use, and then choose **Properties**.

1. Choose your media pool, choose **OK**, and then choose **Next**. 

1. For the next three screens, accept the default settings and choose **Next**. 

1. On the **Perform finishing steps in your backup/template design** screen, choose **Save as** to save this session. In the pop-up window, give the backup a name and assign it to the group where you want to save your new backup specification.

1. Choose **Start Interactive Backup**. 

If the host system contains a database system, you can choose it as your target backup system. The screens and selections are similar to the file-system backup just described.

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job will fail, and the tape drive in Data Protector is marked as **Dirty**. Data Protector also marks the tape quality as **Poor**, and prevents writing to the tape. To continue reading data from the tape, you must clean the drive and re-mount the tape. To complete the failed backup job, you must resubmit it on a new tape.

## Archiving a Tape
<a name="hpdataprotector-archive-tape"></a>

When you archive a tape, Tape Gateway moves the tape from the tape library to the offline storage. Before you eject and archive a tape, you might want to check the content on it. 

**To check a tape's content before archiving it**

1. Choose **Slots** and then choose the tape you want to check. 

1. Choose **Objects** and check what content is on the tape.

When you have chosen a tape to archive, use the following procedure.

**To eject and archive a tape**

1. Open the context (right-click) menu for that tape, and choose **Eject**. 

1. On the Storage Gateway console, choose your gateway, and then choose **VTL Tape Cartridges** and verify the status of the virtual tape you are archiving. 

After the tape is ejected, it will be automatically archived in the offline storage (S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive). The archiving process can take some time to complete. The initial status of the tape is shown as **IN TRANSIT TO VTS**. When archiving starts, the status changes to **ARCHIVING**. When archiving is completed, the tape is no longer listed in the VTL but is archived in S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive. 

## Restoring Data from a Tape
<a name="hpdataprotector-restore-tape"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use Data Protector to restore the data. This process is the same as restoring data from physical tapes.

To restore data from a tape, use the following procedure.

**To restore data from a tape**

1. Choose **Restore** from the drop-down menu at the top-left corner of the window.

1. Choose the file system or database system you want to restore from the left navigation tree. For the backup that you want to restore, make sure that the box is selected. Choose **Restore**.

1. In the **Start Restore Session** window, choose **Needed Media**. Choose **All media**, and you should see the tape originally used for the backup. Choose that tape, and then choose **Close**.

1. In the **Start Restore Session** window, accept the default settings, choose **Next**, and then choose **Finish**.

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Testing your setup by using Microsoft System Center DPM
<a name="backup-DPM"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using Microsoft System Center Data Protection Manager (DPM). In this topic, you can find basic documentation on how to configure the DPM backup application for a Tape Gateway and perform a backup and restore operation.

For detailed information about how to use DPM, see the [DPM documentation](http://technet.microsoft.com/en-us/library/hh758173.aspx) on the Microsoft System Center website. For more information about compatible backup applications, see [Supported third-party backup applications for a Tape Gateway](Requirements.md#requirements-backup-sw-for-vtl).

**Topics**
+ [

## Configuring DPM to Recognize VTL Devices
](#dpm-configure-software)
+ [

## Importing a Tape into DPM
](#dpm-Import-tapes)
+ [

## Writing Data to a Tape in DPM
](#dpm-write-data-to-tape)
+ [

## Archiving a Tape by Using DPM
](#dpm-archive-tape)
+ [

## Restoring Data from a Tape Archived in DPM
](#dpm-restore-tape)

## Configuring DPM to Recognize VTL Devices
<a name="dpm-configure-software"></a>

After you have connected the virtual tape library (VTL) devices to the Windows client, you configure DPM to recognize your devices. For information about how to connect VTL devices to the Windows client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

By default, the DPM server does not recognize Tape Gateway devices. To configure the server to work with the Tape Gateway devices, you perform the following tasks:

1. Update the device drivers for the VTL devices to expose them to the DPM server.

1. Manually map the VTL devices to the DPM tape library.

**To update the VTL device drivers**
+ In Device Manager, update the driver for the medium changer. For instructions, see [Updating the Device Driver for Your Medium Changer](resource_vtl-devices.md#update-vtl-device-driver).

You use the DPMDriveMappingTool to map your tape drives to the DPM tape library.

**To map tape drives to the DPM server tape library**

1. Create at least one tape for your gateway. For information on how to do this on the console, see [Creating Tapes](https://docs.aws.amazon.com/storagegateway/latest/tgw/GettingStartedCreateTapes.html).

1. Import the tape into the DPM library. For information on how to do this, see [Importing a Tape into DPM](#dpm-Import-tapes).

1. If the DPMLA service is running, stop it by opening a command terminal and typing the following on the command line.

   **net stop DPMLA**

1. Locate the following file on the DPM server: `%ProgramFiles%\System Center\DPM\DPM\Config\DPMLA.xml`.
**Note**  
The directory path might change depending on your version of System Center or DPM.  
If this file exists, the DPMDriveMappingTool overwrites it. If you want to preserve your original file, create a backup copy.

1. Open a command terminal, change the directory to `%ProgramFiles%\System Center\DPM\DPM\Bin`, and run the following command.
**Note**  
The directory path might change depending on your version of System Center or DPM.

   ```
                           
   C:\Microsoft System Center\DPM\DPM\bin>DPMDriveMappingTool.exe
   ```

    The output for the command looks like the following.

   ```
                          
   Performing Device Inventory ...
   Mapping Drives to Library ...
   Adding Standalone Drives ...
   Writing the Map File ...
   Drive Mapping Completed Successfully.
   ```

## Importing a Tape into DPM
<a name="dpm-Import-tapes"></a>

You are now ready to import tapes from your Tape Gateway into the DPM backup application library.

**To import tapes into the DPM backup application library**

1. On the DPM server, open the Management Console, choose **Rescan**, and then choose **Refresh**. The Management Console displays your medium changer and tape drives.

1. Open the context (right-click) menu for the media changer in the **Library** section, and then choose **Add tape (I/E port)** to add a tape to the **Slots** list.
**Note**  
The process of adding tapes can take several minutes to complete.

   The tape label appears as **Unknown**, and the tape is not usable. For the tape to be usable, you must identify it.

1. Open the context (right-click) menu for the tape you want to identify, and then choose **Identify unknown tape**. 
**Note**  
The process of identifying tapes can take a few seconds or a few minutes.  
If the tapes don’t display barcodes correctly, you need to change the media changer driver to Sun/StorageTek Library. For more information, see [Displaying Barcodes for Tapes in Microsoft System Center DPM](resource_vtl-devices.md#enable-barcode).

   When identification is complete, the tape label changes to **Free**. That is, the tape is free for data to be written to it.

## Writing Data to a Tape in DPM
<a name="dpm-write-data-to-tape"></a>

You write data to a Tape Gateway virtual tape by using the same protection procedures and policies you do with physical tapes. You create a protection group and add the data you want to back up, and then back up the data by creating a recovery point. For detailed information about how to use DPM, see the [DPM documentation](http://technet.microsoft.com/en-us/library/jj628070.aspx) on the Microsoft System Center website.

By default, the capacity of a tape is 30GB. When you backup data that is larger than a tape's capacity, a device I/O error occurs. If the position where the error occurred is larger than the size of the tape, Microsoft DPM treats the error as an indication of end of tape. If the position where the error occurred is less than the size of the tape, the backup job fails. To resolve the issue, change the `TapeSize` value in the registry entry to match the size of your tape. For information about how to do this, see [Error ID: 30101](https://technet.microsoft.com/en-us/library/ff634181.aspx) at the Microsoft System Center.

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job will fail. To complete the failed backup job, you must resubmit it.

## Archiving a Tape by Using DPM
<a name="dpm-archive-tape"></a>

When you archive a tape, Tape Gateway moves the tape from the DPM tape library to offline storage. You begin tape archival by removing the tape from the slot using your backup application—that is, DPM.

**To archive a tape in DPM**

1. Open the context (right-click) menu for the tape you want to archive, and then choose **Remove tape (I/E port)**.

1. In the dialog box that appears, choose **Yes**. Doing this ejects the tape from the medium changer's storage slot and moves the tape into one of the gateway's I/E slots. When a tape is moved into the gateway's I/E slot, it is immediately sent for archiving.

1. On the Storage Gateway console, choose your gateway, and then choose **VTL Tape Cartridges** and verify the status of the virtual tape you are archiving. 

   The archiving process can take some time to complete. The initial status of the tape is shown as **IN TRANSIT TO VTS**. When archiving starts, the status changes to **ARCHIVING**. When archiving is completed, the tape is no longer listed in the VTL.

## Restoring Data from a Tape Archived in DPM
<a name="dpm-restore-tape"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape from archive to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use the DPM backup application to restore the data. You do this by creating a recovery point, as you do when restoring data from physical tapes. For instructions, see [Recovering Client Computer Data](http://technet.microsoft.com/en-us/library/hh757887.aspx) on the DPM website.

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Testing your setup by using NovaStor DataCenter
<a name="backup-novastor"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using NovaStor DataCenter/Network. In this topic, you can find basic documentation on how to configure the NovaStor DataCenter/Network backup application for a Tape Gateway and perform backup and restore operations. For detailed information about how to use NovaStor DataCenter/Network, refer to the NovaStor DataCenter/Network documentation.

## Setting Up NovaStor DataCenter/Network
<a name="setting-up"></a>

After you have connected your virtual tape library (VTL) devices to your Microsoft Windows client, you configure the NovaStor software to recognize your devices. For information about how to connect VTL devices to your Windows client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

NovaStor DataCenter/Network requires drivers from the driver manufacturers. You can use the Windows drivers, but you must first deactivate other backup applications.

## Configuring NovaStor DataCenter/Network to Work with VTL Devices
<a name="configuring-novastor"></a>

When configuring your VTL devices to work with NovaStor DataCenter/Network, you might see an error message that reads `External Program did not exit correctly`. This issue requires a workaround, which you need to perform before you continue. 

You can prevent the issue by creating the workaround before you start configuring your VTL devices. For information about how to create the workaround, see [Resolving an "External Program Did Not Exit Correctly" Error](#novastor-workaround).

**To configure NovaStor DataCenter/Network to work with VTL devices**

1. In the NovaStor DataCenter/Network Admin console, choose **Media Management**, and then choose **Storage Management**.

1. In the **Storage Targets** menu, open the context menu (right-click) for **Media Management Servers**, choose **New**, and choose **OK** to create and prepopulate a **storage** node. 

   If you see an error message that says `External Program did not exit correctly`, resolve the issue before you continue. This issue requires a workaround. For information about how to resolve this issue, see [Resolving an "External Program Did Not Exit Correctly" Error](#novastor-workaround).
**Important**  
This error occurs because the element assignment range from AWS Storage Gateway for storage drives and tape drives exceeds the number that NovaStor DataCenter/Network allows.

   

1. Open the context (right-click) menu for the **storage** node that was created, and choose **New Library**.

1. Choose the library server from the list. The library list is automatically populated.

1. Name the library and choose **OK**.

1. Choose the library to display all the properties of the Storage Gateway virtual tape library.

1. In the **Storage Targets** menu, expand **Backup Servers**, open the context (right-click) menu for the server, and choose **Attach Library**.

1. In the **Attach Library** dialog box that appears, choose the **LTO5** media type, and then choose **OK**.

1. Expand **Backup Servers** to see the Storage Gateway virtual tape library and the library partition that shows all the mounted tape drives.

## Creating a Tape Pool
<a name="create-tape-pool"></a>

A tape pool is dynamically created in the NovaStor DataCenter/Network software and so doesn't contain a fixed number of media. A tape pool that needs a tape gets it from its scratch pool. A *scratch pool* is a reservoir of tapes that are freely available for one or more tape pools to use. A tape pool returns to the scratch pool any media that have exceeded their retention times and that are no longer needed.

Creating a tape pool is a three-step task:

1. You create a scratch pool.

1. You assign tapes to the scratch pool.

1. You create a tape pool.

**To create a scratch pool**

1. In the left navigation menu, choose the **Scratch Pools** tab. 

1. Open the context (right-click) menu for **Scratch Pools**, and choose **Create Scratch Pool**. 

1. In the **Scratch Pools** dialog box, name your scratch pool, and then choose your media type.

1. Choose **Label Volume**, and create a low water mark for the scratch pool. When the scratch pool is emptied down to the low water mark, a warning appears.

1. In the warning dialog box that appears, choose **OK** to create the scratch pool.

**To assign tapes to a scratch pool**

1. In the left navigation menu, choose **Tape Library Management**.

1. Choose the **Library** tab to see your library's inventory.

1. Choose the tapes that you want to assign to the scratch pool. Make sure that the tapes are set to the correct media type.

1. Open the context (right-click) menu for the library and choose **Add to Scratch Pool**. 

You now have a filled scratch pool that you can use for tape pools.

**To create a tape pool**

1. From the left navigation menu, choose **Tape Library Management**.

1. Open the context (right-click) menu for the **Media Pools** tab and choose **Create Media Pool**.

1. Name the media pool and choose **Backup Server**.

1. Choose a library partition for the media pool.

1. Choose the scratch pool that you want the pool to get the tapes from.

1. For **Schedule**, choose **Not Scheduled**.

## Configuring Media Import and Export to Archive Tapes
<a name="configure-media-import"></a>

NovaStor DataCenter/Network can use import/export slots if they are part of the media changer. 

For an export, NovaStor DataCenter/Network must know which tapes are going to be physically taken out of the library. 

For an import, NovaStor DataCenter/Network recognizes tape media that are exported in the tape library and offers to import them all, either from a data slot or an export slot. Your Tape Gateway archives tapes in the offline storage (S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive).

**To configure media import and export**

1. Navigate to **Tape Library Management**, choose a server for **Media Management Server**, and then choose **Library**.

1. Choose the **Off-site Locations** tab.

1. Open the context (right-click) menu for the white area, and choose **Add** to open a new panel.

1. In the panel, type **S3 Glacier Flexible Retrieval** or **S3 Glacier Deep Archive** and add an optional description in the text box.

## Backing Up Data to Tape
<a name="novastor-backup-data"></a>

You create a backup job and write data to a virtual tape by using the same procedures that you do with physical tapes. For detailed information about how to back up data using the NovaStor software, see [Documentation NovaStor DataCenter/Network](https://dcmanual.novastor.com/help-html/dc/en/StartBackupJob.html).

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job will fail, and the tape will become unwriteable. You can archive the tape or continue to read data from it. To complete the failed backup job, you must resubmit it on a new tape.

## Archiving a Tape
<a name="novastor-archive-tape"></a>

When you archive a tape, a Tape Gateway ejects the tape from the tape drive to the storage slot. It then exports the tape from the slot to the archive by using your backup application—that is, NovaStor DataCenter/Network.

**To archive a tape**

1. In the left navigation menu, choose **Tape Library Management**.

1. Choose the **Library** tab to see the library's inventory.

1. Highlight the tapes you want to archive, open the context (right-click) menu for the tapes, and choose your off-site archive location.

The archiving process can take some time to complete. The initial status of the tape appears as **IN TRANSIT TO VTS**. When archiving starts, the status changes to **ARCHIVING**. When archiving is completed, the tape is no longer listed in the VTL.

In NovaStor DataCenter/Network, verify that the tape is no longer in the storage slot.

In the navigation pane of the Storage Gateway console, choose **Tapes**. Verify that your archived tape's status is **ARCHIVED**. 

## Restoring Data from an Archived and Retrieved Tape
<a name="novastor-retrieve-from-archive"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape from archive to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use the NovaStor DataCenter/Network software to restore the data. You do this by refreshing the mail slot and moving each tape you want to retrieve into an empty slot, as you do when restoring data from physical tapes. For information about restoring data, see [Documentation NovaStor DataCenter/Network](https://dcmanual.novastor.com/help-html/dc/en/RestoretheExample.html).

## Writing Several Backup Jobs to a Tape Drive at the Same Time
<a name="novastor-muliplexing"></a>



In the NovaStor software, you can write several jobs to a tape drive at the same time using the multiplexing feature. This feature is available when a multiplexer is available for a media pool. For information about how to use multiplexing, see [Documentation NovaStor DataCenter/Network](https://dcmanual.novastor.com/help-html/dc/en/DefineBackupDestinationandSchedu.html).

## Resolving an "External Program Did Not Exit Correctly" Error
<a name="novastor-workaround"></a>

When configuring your VTL devices to work with NovaStor DataCenter/Network, you might see an error message that reads `External Program did not exit correctly`. This error occurs because the element assignment range from Storage Gateway for storage drives and tape drives exceeds the number that NovaStor DataCenter/Network allows. 

Storage Gateway returns 3200 storage and import/export slots, which is more than the 2400 limit that NovaStor DataCenter/Network allows. To resolve this issue, you add a configuration file that activates the NovaStor software to limit the number of storage and import/export slots and preconfigures the element assignment range. 

**To apply the workaround for an "external program did not exit correctly" error**

1. Navigate to the Tape folder on your computer where you installed the NovaStor software.

1. In the Tape folder, create a text file and name it `hijacc.ini`.

1. Copy the following content, paste it into `hijacc.ini` file, and save the file.

   ```
   port:12001
   san:no
   define: A3B0S0L0
   *DRIVES: 10
   *FIRST_DRIVE: 10000
   *SLOTS: 200
   *FIRST_SLOT: 20000
   *HANDLERS: 1
   *FIRST_HANDLER: 0
   *IMP-EXPS: 30
   *FIRST_IMP-EXP: 30000
   ```

1. Add and attach the library to the media management server.

1. Move a tape from the import/export slot into the library by using the following command. Replace the example library name with the name of the library in your deployment.

   `C:\Program Files\NovaStor\DataCenter\Hitback\tape\ophijacc.exe -c VTL-ec2amaz-uko8jfj-ec2amaz-uko8jfj.lcfg`

1. Attach the library to the backup server.

1. In the NovaStor software, import all the tapes from import/export slots into the library.

# Testing your setup by using Quest NetVault Backup
<a name="backup-netvault"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using Quest (formerly Dell) NetVault Backup.

In this topic, you can find basic documentation on how to configure the Quest NetVault Backup application for a Tape Gateway and perform a backup and restore operation. 

For detailed information about how to use the Quest NetVault Backup application, see the Quest NetVault Backup – Administration Guide. For more information about compatible backup applications, see [Supported third-party backup applications for a Tape Gateway](Requirements.md#requirements-backup-sw-for-vtl).

**Topics**
+ [

## Configuring Quest NetVault Backup to Work with VTL Devices
](#netvault-configure-software)
+ [

## Backing Up Data to a Tape in the Quest NetVault Backup
](#netvault-write-data-to-tape)
+ [

## Archiving a Tape by Using the Quest NetVault Backup
](#netvault-archive-tape)
+ [

## Restoring Data from a Tape Archived in Quest NetVault Backup
](#netvault-restore-tape)

## Configuring Quest NetVault Backup to Work with VTL Devices
<a name="netvault-configure-software"></a>

After you have connected the virtual tape library (VTL) devices to the Windows client, you configure Quest NetVault Backup to recognize your devices. For information about how to connect VTL devices to the Windows client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

The Quest NetVault Backup application doesn't automatically recognize Tape Gateway devices. You must manually add the devices to expose them to the Quest NetVault Backup application and then discover the VTL devices.

### Adding VTL Devices
<a name="netvault-add-devices"></a>

**To add the VTL devices**

1. In Quest NetVault Backup, choose **Manage Devices** in the **Configuration** tab.

1. On the Manage Devices page, choose **Add Devices**.

1. In the Add Storage Wizard, choose **Tape library / media changer**, and then choose **Next**.

1. On the next page, choose the client machine that is physically attached to the library and choose **Next** to scan for devices.

1. If devices are found, they are displayed. In this case, your medium changer is displayed in the device box.

1. Choose your medium changer and choose **Next**. Detailed information about the device is displayed in the wizard.

1. On the Add Tapes to Bays page, choose **Scan For Devices**, choose your client machine, and then choose **Next**. 

   Quest NetVault Backup displays all of your drives, and the 10 bays to which you can add your drives. The bays are displayed one at a time.

1. Choose the drive you want to add to the bay that is displayed, and then choose **Next**.
**Important**  
When you add a drive to a bay, the drive and bay numbers must match. For example, if bay 1 is displayed, you must add drive 1. If a drive is not connected, leave its matching bay empty.

1. When your client machine appears, choose it, and then choose **Next**. The client machine can appear multiple times.

1. When the drives are displayed, repeat steps 7 through 9 to add all the drives to the bays.

1. In the **Configuration** tab, choose **Manage devices** and on the **Manage Devices** page, expand your medium changer to see the devices that you added.

## Backing Up Data to a Tape in the Quest NetVault Backup
<a name="netvault-write-data-to-tape"></a>

You create a backup job and write data to a virtual tape by using the same procedures you do with physical tapes. For detailed information about how to back up data, see the [Quest NetVault Backup - Administration Guide](https://support.quest.com/technical-documents/netvault-backup/12.4/administration-guide).

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job will fail. To complete the failed backup job, you must resubmit it.

## Archiving a Tape by Using the Quest NetVault Backup
<a name="netvault-archive-tape"></a>

When you archive a tape, a Tape Gateway ejects the tape from the tape drive to the storage slot. It then exports the tape from the slot to the archive by using your backup application—that is, the Quest NetVault Backup.

**To archive a tape in Quest NetVault Backup**

1. In the Quest NetVault Backup Configuration tab, choose and expand your medium changer to see your tapes.

1. Choose the settings icon for **Slots** to open the **Slots Browser** for the medium changer.

1. In the slots, choose the tape you want to archive, and then choose **Export**.

The archiving process can take some time to complete. The initial status of the tape appears as **IN TRANSIT TO VTS**. When archiving starts, the status changes to **ARCHIVING**. When archiving is completed, the tape is no longer listed in the VTL.

In the Quest NetVault Backup software, verify that the tape is no longer in the storage slot.

In the navigation pane of the Storage Gateway console, choose **Tapes**. Verify that your archived tape's status is **ARCHIVED**. 

## Restoring Data from a Tape Archived in Quest NetVault Backup
<a name="netvault-restore-tape"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape from archive to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use the Quest NetVault Backup application to restore the data. You do this by creating a restoring a folder file, as you do when restoring data from physical tapes. For instructions on creating a restore job, see [Quest NetVault Backup - Administration Guide](https://support.quest.com/technical-documents/netvault-backup/12.4/administration-guide).

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Testing your setup by using Veeam Backup and Replication
<a name="backup-Veeam"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using Veeam Backup & Replication. In this topic, you can find basic documentation on how to configure the Veeam Backup & Replication software for a Tape Gateway and perform a backup and restore operation. For detailed information about how to use the Veeam software, refer to the Veeam Backup & Replication documentation. For more information about compatible backup applications, see [Supported third-party backup applications for a Tape Gateway](Requirements.md#requirements-backup-sw-for-vtl).

**Topics**
+ [

## Configuring Veeam to Work with VTL Devices
](#veeam-configure-software)
+ [

## Importing a Tape into Veeam
](#veeam-Import-tapes)
+ [

## Backing Up Data to a Tape in Veeam
](#veeam-write-data-to-tape)
+ [

## Archiving a Tape by Using Veeam
](#veeam-archive-tape)
+ [

## Restoring Data from a Tape Archived in Veeam
](#veeam-restore-tape)

## Configuring Veeam to Work with VTL Devices
<a name="veeam-configure-software"></a>

After you have connected your virtual tape library (VTL) devices to the Windows client, you configure Veeam Backup & Replication to recognize your devices. For information about how to connect VTL devices to the Windows client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

### Updating VTL Device Drivers
<a name="veeam-update-driver"></a>

To configure the software to work with Tape Gateway devices, you update the device drivers for the VTL devices to expose them to the Veeam software and then discover the VTL devices. In Device Manager, update the driver for the medium changer. For instructions, see [Updating the Device Driver for Your Medium Changer](resource_vtl-devices.md#update-vtl-device-driver).

### Discovering VTL Devices
<a name="veeam-dicorver-tapes"></a>

You must use native SCSI commands instead of a Windows driver to discover your tape library if your media changer is unknown. For detailed instructions, see [Tape Libraries](https://helpcenter.veeam.com/docs/backup/vsphere/managing_library.html).

**To discover VTL devices**

1. In the Veeam software, choose **Tape Infrastructure**. When the Tape Gateway is connected, virtual tapes are listed in the **Tape Infrastructure** tab.

1. Expand the **Tape** tree to see your tape drives and medium changer.

1. Expand the medium changer tree. If your tape drives are mapped to the medium changer, the drives appear under **Drives**. Otherwise, your tape library and tape drives appear as separate devices. 

   If the drives are not mapped automatically, follow the [instructions on the Veeam website](http://www.veeam.com/kb1842) to map the drives. 

## Importing a Tape into Veeam
<a name="veeam-Import-tapes"></a>

You are now ready to import tapes from your Tape Gateway into the Veeam backup application library.

**To import a tape into the Veeam library**

1. Open the context (right–click) menu for the medium changer, and choose **Import** to import the tapes to the I/E slots.

1. Open the context (right–click) menu for the medium charger, and choose **Inventory Library** to identify unrecognized tapes. When you load a new virtual tape into a tape drive for the first time, the tape is not recognized by the Veeam backup application. To identify the unrecognized tape, you inventory the tapes in the tape library.

## Backing Up Data to a Tape in Veeam
<a name="veeam-write-data-to-tape"></a>

Backing data to a tape is a two-step process: 

1. You create a media pool and add the tape to the media pool.

1. You write data to the tape.

You create a media pool and write data to a virtual tape by using the same procedures you do with physical tapes. For detailed information about how to back up data, see the [Getting Started with Tapes](https://helpcenter.veeam.com/docs/backup/vsphere/getting_started_with_tapes.html) in the Veeam Help Center.

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job will fail. To complete the failed backup job, you must resubmit it.

## Archiving a Tape by Using Veeam
<a name="veeam-archive-tape"></a>

When you archive a tape, Tape Gateway moves the tape from the Veeam tape library to the offline storage. You begin tape archival by ejecting from the tape drive to the storage slot and then exporting the tape from the slot to the archive by using your backup application—that is, the Veeam software.

**To archive a tape in the Veeam library**

1. Choose **Tape Infrastructure**, and choose the media pool that contains the tape you want to archive. 

1. Open the context (right–click) menu for the tape that you want to archive, and then choose **Eject Tape**.

1. For **Ejecting tape**, choose **Close**. The location of the tape changes from a tape drive to a slot.

1. Open the context (right–click) menu for the tape again, and then choose **Export**. The status of the tape changes from **Tape drive **to **Offline**.

1. For **Exporting tape**, choose **Close**. The location of the tape changes from **Slot** to **Offline**.

1. On the Storage Gateway console, choose your gateway, and then choose **VTL Tape Cartridges** and verify the status of the virtual tape you are archiving. 

   The archiving process can take some time to complete. The initial status of the tape appears as **IN TRANSIT TO VTS**. When archiving starts, the status changes to **ARCHIVING**. When archiving is completed, the tape is no longer listed in the VTL but is archived in S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive.

## Restoring Data from a Tape Archived in Veeam
<a name="veeam-restore-tape"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape from archive to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use the Veeam software to restore the data. You do this by creating a restoring a folder file, as you do when restoring data from physical tapes. For instructions, see [Restoring Files from Tape](https://helpcenter.veeam.com/docs/backup/vsphere/restore_files_from_tapes.html) in the Veeam Help Center.

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Testing Your Setup by Using Veritas Backup Exec
<a name="backup-BackupExec"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using Veritas Backup Exec. In this topic, you can find basic documentation needed to perform backup and restore operations using Backup Exec.

For more detailed information about how to use Backup Exec, including how to create secure backups, software and hardware compatibility lists, and administrator guides, refer to the [Veritas support website](https://www.veritas.com/support/).

For more information about supported backup applications, see [Supported third-party backup applications for a Tape Gateway](Requirements.md#requirements-backup-sw-for-vtl).

**Topics**
+ [

## Configuring Storage in Backup Exec
](#BE-configure-storage)
+ [

## Importing a Tape in Backup Exec
](#BE-import-tape)
+ [

## Writing Data to a Tape in Backup Exec
](#BE-write-data-to-tape)
+ [

## Archiving a Tape Using Backup Exec
](#BE-archive-tapes)
+ [

## Restoring Data from a Tape Archived in Backup Exec
](#BE-restore-tape)
+ [

## Deactivating a Tape Drive in Backup Exec
](#BE-disable-tape-drive)

## Configuring Storage in Backup Exec
<a name="BE-configure-storage"></a>

After you have connected the virtual tape library (VTL) devices to the Windows client, you configure Backup Exec storage to recognize your devices. For information about how to connect VTL devices to the Windows client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

**To configure storage**

1. Start the Backup Exec software, and then choose the yellow icon in top-left corner on the toolbar.

1. Choose **Configuration and Settings**, and then choose **Backup Exec Services** to open the Backup Exec Service Manager.

1. Choose **Restart All Services**. Backup Exec then recognizes the VTL devices (that is, the medium changer and tape drives). The restart process might take a few minutes.
**Note**  
Tape Gateway provides 10 tape drives. However, your Backup Exec license agreement might require your backup application to work with fewer than 10 tape drives. In that case, you must deactivate tape drives in the Backup Exec robotic library to leave only the number of tape drives allowed by your license agreement actuvated. For instructions, see [Deactivating a Tape Drive in Backup Exec](#BE-disable-tape-drive).

1. After the restart is completed, close the Backup Exec Service Manager.

## Importing a Tape in Backup Exec
<a name="BE-import-tape"></a>

You are now ready to import a tape from your gateway into a slot.

1. Choose the **Storage** tab, and then expand the **Robotic library** tree to display the VTL devices. 
**Important**  
Veritas Backup Exec software requires the Tape Gateway medium changer type. If the medium changer type listed under **Robotic library** is not Tape Gateway, you must change it before you configure storage in the backup application. For information about how to select a different medium changer type, see [Selecting a Medium Changer After Gateway Activation](resource_vtl-devices.md#change-mediumchanger-vtl).

1. Choose the **Slots** icon to display all slots. 
**Note**  
When you import tapes into the robotic library, the tapes are stored in slots instead of tape drives. Therefore, the tape drives might have a message that indicates there is no media in the drives (No media). When you initiate a backup or restore job, the tapes are moved into the tape drives.  
You must have tapes available in your gateway tape library to import a tape into a storage slot. For instructions on how to create tapes, see [Creating new virtual tapes for Tape Gateway](GettingStartedCreateTapes.md).

1. Open the context (right-click) menu for an empty slot, choose **Import**, and then choose **Import media now**. You can select more than one slot and import multiple tapes in a single import operation.

1. In the **Media Request** window that appears, choose **View details**.

1. In the **Action Alert: Media Intervention** window, choose **Respond OK** to insert the media into the slot.

   The tape appears in the slot you selected.
**Note**  
Tapes that are imported include empty tapes and tapes that have been retrieved from the archive to the gateway.

## Writing Data to a Tape in Backup Exec
<a name="BE-write-data-to-tape"></a>

You write data to a Tape Gateway virtual tape by using the same procedure and backup policies you do with physical tapes. For detailed information, see the *Backup Exec Administrative Guide *in the documentation section in the Backup Exec software.

**Note**  
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job might fail. If the backup job fails, the tape status in Veritas Backup Exec changes to **Not Appendable**. You can archive the tape or continue to read data from it. To complete the failed backup job, you must resubmit it on a new tape.

## Archiving a Tape Using Backup Exec
<a name="BE-archive-tapes"></a>

When you archive a tape, Tape Gateway moves the tape from your gateway’s virtual tape library (VTL) to the offline storage. You begin tape archival by exporting the tape using your Backup Exec software.

**To archive your tape**

1. Choose the **Storage** menu, choose **Slots**, open the context (right-click) menu for the slot you want to export the tape from, choose **Export media**, and then choose **Export media now**. You can select more than one slot and export multiple tapes in a single export operation.

1. In the **Media Request** pop-up window, choose **View details**, and then choose **Respond OK** in the **Alert: Media Intervention** window. 

   In the Storage Gateway console, you can verify the status of the tape you are archiving. It might take some time to finish uploading data to AWS. During this time, the exported tape is listed in the Tape Gateway VTL with the status **IN TRANSIT TO VTS**. When the upload is completed and the archiving process begins, the status changes to **ARCHIVING**. When data archiving has completed, the exported tape is no longer listed in the VTL but is archived in S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive.

1. Choose your gateway, and then choose **VTL Tape Cartridges** and verify that the virtual tape is no longer listed in your gateway. 

1. On the Navigation pane of the Storage Gateway console, choose **Tapes**. Verify that your tape's status is **ARCHIVED**.

## Restoring Data from a Tape Archived in Backup Exec
<a name="BE-restore-tape"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use Backup Exec to restore the data. This process is the same as restoring data from physical tapes. For instructions, see the *Backup Exec Administrative Guide *in the documentation section in the Backup Exec software.

## Deactivating a Tape Drive in Backup Exec
<a name="BE-disable-tape-drive"></a>

A Tape Gateway provides 10 tape drives, but you might decide to use fewer tape drives. In that case, you deactivate the tape drives you don't use.

1. Open Backup Exec, and choose the **Storage** tab.

1. In the **Robotic library** tree, open the context (right-click) menu for the tape drive you want to deactivate, and then choose **Disable**.

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Testing Your Setup by Using Veritas NetBackup
<a name="backup_netbackup-vtl"></a>

You can back up your data to virtual tapes, archive the tapes, and manage your virtual tape library (VTL) devices by using Veritas NetBackup. In this topic, you can find basic documentation on how to configure the NetBackup application for a Tape Gateway and perform a backup and restore operation.

For detailed information about how to use NetBackup, see the [Veritas Services and Operations Readiness Tools (SORT)](https://sort.veritas.com/documents) page on the Veritas website.

For more information about compatible backup applications, see [Supported third-party backup applications for a Tape Gateway](Requirements.md#requirements-backup-sw-for-vtl).

**Topics**
+ [

## Configuring NetBackup Storage Devices
](#configure-netback-storage-devices)
+ [

## Backing Up Data to a Tape
](#GettingStarted-backup-data-VTL)
+ [

## Archiving the Tape
](#GettingStarted-archiving-tapes-vtl)
+ [

## Restoring Data from the Tape
](#restore-data-vtl)

## Configuring NetBackup Storage Devices
<a name="configure-netback-storage-devices"></a>

After you have connected the virtual tape library (VTL) devices to the Windows client, you configure Veritas NetBackup storage to recognize your devices. For information about how to connect VTL devices to the Windows client, see [Connecting your VTL devices](GettingStartedAccessTapesVTL.md).

**To configure NetBackup to use storage devices on your Tape Gateway**

1. Open the NetBackup Administration Console as an administrator.

1. Choose **Configure Storage Devices** to open the Device Configuration wizard.

1. Choose **Next**. The NetBackup application detects your computer as a device host.

1. In the **Device Hosts** column, select your computer, and then choose **Next**. The NetBackup application scans your computer for devices and discovers all devices.

1. In the **Scanning Hosts** page, choose **Next**, and then choose **Next**. The NetBackup application finds all 10 tape drives and the medium changer on your computer.

1. In the **Backup Devices** window, choose **Next**.

1. In the **Drag and Drop Configuration** window, verify that your medium changer is selected, and then choose **Next.** 

1. In the dialog box that appears, choose **Yes** to save the configuration on your computer. The NetBackup application updates the device configuration.

1. When the update is completed, choose **Next** to make the devices available to the NetBackup application. 

1. In the **Finished\$1** window, choose **Finish**.

**To verify your devices in the NetBackup application**

1. In the NetBackup Administration Console, expand the **Media and Device Management** node, and then expand the **Devices** node. Choose **Drives** to display all the tape drives.

1. In the **Devices** node, choose **Robots** to display all your medium changers. In the NetBackup application, the medium changer is called a *robot*.

1. In the **All Robots** pane, open the context (right-click) menu for **TLD(0)** (that is, your robot), and then choose **Inventory Robot**. 

1. In the **Robot Inventory** window, verify that your host is selected from the **Device-Host** list located in the **Select robot** category.

1. Verify that your robot is selected from the **Robot** list.

1. In the **Robot Inventory** window, select **Update volume configuration**, select **Preview changes**, select **Empty media access port prior to update**, and then choose **Start**.

   The process then inventories your medium changer and virtual tapes in the NetBackup Enterprise Media Management (EMM) database. NetBackup stores media information, device configuration, and tape status in the EMM.

1. In the **Robot Inventory** window, choose **Yes** once the inventory is complete. Choosing **Yes** here updates the configuration and moves virtual tapes found in import/export slots to the virtual tape library.

1. Close the **Robot Inventory** window.

1. In the **Media** node, expand the **Robots** node and choose **TLD(0)** to show all virtual tapes that are available to your robot (medium changer).
**Note**  
If you have previously connected other devices to the NetBackup application, you might have multiple robots. Make sure that you select the right robot.

Now that you have connected your devices and made them available to your backup application, you are ready to test your gateway. To test your gateway, you back up data onto the virtual tapes you created and archive the tapes. 

## Backing Up Data to a Tape
<a name="GettingStarted-backup-data-VTL"></a>

You test the Tape Gateway setup by backing up data onto your virtual tapes.

**Note**  
You should back up only a small amount of data for this Getting Started exercise, because there are costs associated with storing, archiving, and retrieving data. For pricing information, see [Pricing](https://aws.amazon.com/storagegateway/pricing) on the Storage Gateway detail page.
If your Tape Gateway restarts for any reason during an ongoing backup job, the backup job will be suspended. The suspended backup job will resume automatically when your gateway finishes restarting.



**To create a volume pool**

A *volume pool* is a collection of virtual tapes to use for a backup.

1. Start the NetBackup Administration Console.

1. Expand the **Media** node, open the context (right-click) menu for **Volume Pool**, and then choose **New**. The **New Volume Pool** dialog box appears.

1. For **Name**, type a name for your volume pool.

1. For **Description**, type a description for the volume pool, and then choose **OK**. The volume pool you just created is added to the volume pool list.

   The following screenshot shows a list of volume pools.

**To add virtual tapes to a volume pool**

1. Expand the **Robots** node, and select the **TLD(0)** robot to display the virtual tapes this robot is aware of.

   If you have previously connected a robot, your Tape Gateway robot might have a different name.

1. From the list of virtual tapes, open the context (right-click) menu for the tape you want to add to the volume pool, and choose **Change** to open the **Change Volumes** dialog box.

1. For **Volume Pool**, choose **New pool**.

1. For **New pool**, select the pool you just created, and then choose **OK**.

   You can verify that your volume pool contains the virtual tape that you just added by expanding the **Media** node and choosing your volume pool.

**To create a backup policy**

The backup policy specifies what data to back up, when to back it up, and which volume pool to use.

1. Choose your **Master Server** to return to the Veritas NetBackup console.

1. Choose **Create a Policy** to open the **Policy Configuration Wizard** window.

1. Select **File systems, databases, applications**, and choose **Next**.

1. For **Policy Name**, type a name for your policy and verify that **MS-Windows** is selected from the **Select the policy type** list, and then choose **Next**.

1. In the **Client List** window, choose **Add**, type the host name of your computer in the **Name** column, and then choose **Next**. This step applies the policy you are defining to `localhost` (your client computer).

1. In the **Files** window, choose **Add**, and then choose the folder icon.

1. In the **Browse** window, browse to the folder or files you want to back up, choose **OK**, and then choose **Next**.

1. In the **Backup Types** window, accept the defaults, and then choose **Next**.
**Note**  
If you want to initiate the backup yourself, select **User Backup**. 

1. In the **Frequency and Retention** window, select the frequency and retention policy you want to apply to the backup. For this exercise, you can accept all of the defaults and choose** Next**.

1. In the **Start** window, select **Off hours**, and then choose **Next**. This selection specifies that your folder should be backed up during off hours only.

1. In the **Policy Configuration** wizard, choose **Finish**.

The policy runs the backups according to the schedule. You can also perform a manual backup at any time, which we do in the next step.

**To perform a manual backup**

1. On the navigation pane of the NetBackup console, expand the **NetBackup Management** node.

1. Expand the **Policies** node.

1. Open the context (right-click) menu for your policy, and choose **Manual Backup**.

1. In the **Manual Backup** window, select a schedule, select a client, and then choose **OK**.

1. In the **Manual Backup Started** dialog box that appears, choose **OK**.

1. On the navigation pane, choose **Activity Monitor** to view the status of your backup in the **Job ID** column.

To find the barcode of the virtual tape where NetBackup wrote the file data during the backup, look in the **Job Details** window as described in the following procedure. You need this barcode in the procedure in the next section, where you archive the tape.

**To find the barcode of a tape**

1. In **Activity Monitor**, open the context (right-click) menu for the identifier of your backup job in the **Job ID** column, and then choose **Details**. 

1. In the **Job Details** window, choose the **Detailed Status** tab. 

1. In the **Status** box, locate the media ID. For example, an entry in the status report might read `media id 87A222`. This ID helps you determine which tape you have written data to.

You have now successfully deployed a Tape Gateway, created virtual tapes, and backed up your data. Next, you can archive the virtual tapes and retrieve them from the archive.

## Archiving the Tape
<a name="GettingStarted-archiving-tapes-vtl"></a>

When you archive a tape, Tape Gateway moves the tape from your gateway’s virtual tape library (VTL) to the archive, which provides offline storage. You initiate tape archival by ejecting the tape using your backup application.   

**To archive a virtual tape**

1. In the NetBackup Administration console, expand the **Media and Device Management** node, and expand the **Media** node.

1. Expand **Robots** and choose **TLD**(0). 

1. Open the context (right-click) menu for the virtual tape you want to archive, and choose **Eject Volume From Robot**.

1. In the **Eject Volumes** window, make sure the **Media ID** matches the virtual tape you want to eject, and then choose **Eject**.

1. In the dialog box, choose **Yes**.

   When the eject process is completed, the status of the tape in the **Eject Volumes** dialog box indicates that the eject succeeded.

1. Choose **Close** to close the **Eject Volumes** window.

1. In the Storage Gateway console, verify the status of the tape you are archiving in the gateway's VTL. It can take some time to finish uploading data to AWS. During this time, the ejected tape is listed in the gateway's VTL with the status **IN TRANSIT TO VTS**. When archiving starts, the status is **ARCHIVING**. Once data upload has completed, the ejected tape is no longer listed in the VTL but is archived in S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive.

1. To verify that the virtual tape is no longer listed in your gateway, choose your gateway, and then choose **VTL Tape Cartridges**. 

1. In the navigation pane of the Storage Gateway console, choose **Tapes**. Verify that your archived tape's status is **ARCHIVED**.

## Restoring Data from the Tape
<a name="restore-data-vtl"></a>

Restoring your archived data is a two-step process.

**To restore data from an archived tape**

1. Retrieve the archived tape to a Tape Gateway. For instructions, see [Retrieving Archived Tapes](retrieving-archived-tapes-vtl.md).

1. Use the Backup, Archive, and Restore software installed with the Veritas NetBackup application. This process is the same as restoring data from physical tapes. For instructions, see [Veritas Services and Operations Readiness Tools (SORT)](https://sort.veritas.com/documents) on the Veritas website.

**Next Step**

[Cleaning up unecessary resources](best-practices.md#cleanup-vtl)

# Where do I go from here?
<a name="GettingStartedWhatsNextStep3-vtl"></a>

After your Tape Gateway is in production, you can perform several maintenance tasks, such as adding and removing tapes, monitoring and optimizing gateway performance, and troubleshooting. For general information about these management tasks, see [Managing your Tape Gateway](managing-gateway-common.md).

You can perform some of the Tape Gateway maintenance tasks on the AWS Management Console, such as configuring your gateway's bandwidth rate limits and managing gateway software updates. If your Tape Gateway is deployed on-premises, you can perform some maintenance tasks on the gateway's local console. These include routing your Tape Gateway through a proxy and configuring your gateway to use a static IP address. If you are running your gateway as an Amazon EC2 instance, you can perform specific maintenance tasks on the Amazon EC2 console, such as adding and removing Amazon EBS volumes. For more information on maintaining your Tape Gateway, see [Managing your Tape Gateway](managing-gateway-common.md). 

If you plan to deploy your gateway in production, you should take your real workload into consideration in determining the disk sizes. For information on how to determine real-world disk sizes, see [Managing local disks for your Storage Gateway](ManagingLocalStorage-common.md). Also, consider cleaning up if you don't plan to continue using your Tape Gateway. Cleaning up lets you avoid incurring charges. For information on cleanup, see [Cleaning up unecessary resources](best-practices.md#cleanup-vtl).

# Activating your gateway in a virtual private cloud
<a name="gateway-private-link"></a>

You can create a private connection between your on-premises gateway appliance and cloud-based storage infrastructure. You can use this connection to activate your gateway and allow it to transfer data to AWS storage services without communicating over the public internet. Using the Amazon VPC service, you can launch AWS resources, including private network interface endpoints, in a custom virtual private cloud (VPC). A VPC gives you control over network settings such as IP address range, subnets, route tables, and network gateways. For more information about VPCs, see [What is Amazon VPC?](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html) in the *Amazon VPC User Guide*.

To activate your gateway in a VPC, use the Amazon VPC Console to create a VPC endpoint for Storage Gateway and get the VPC endpoint ID, then specify this VPC endpoint ID when you create and activate the gateway. For more information, see [Connect your Tape Gateway to AWS](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html#connect-to-amazon-tape).

**Note**  
You must activate your gateway in the same region where you create the VPC endpoint for Storage Gateway

**Topics**
+ [

## Creating a VPC endpoint for Storage Gateway
](#create-vpc-endpoint)

## Creating a VPC endpoint for Storage Gateway
<a name="create-vpc-endpoint"></a>

Follow these instructions to create a VPC endpoint. If you already have a VPC endpoint for Storage Gateway, you can use it to activate your gateway.<a name="create-vpc-steps"></a>

**To create a VPC endpoint for Storage Gateway**

1. Sign in to the AWS Management Console and open the Amazon VPC console at [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/).

1. In the navigation pane, choose **Endpoints**, and then choose **Create Endpoint**.

1. On the **Create Endpoint** page, choose **AWS Services** for **Service category**.

1. For **Service Name**, choose `com.amazonaws.region.storagegateway`. For example `com.amazonaws.us-east-2.storagegateway`.

1. For **VPC**, choose your VPC and note its Availability Zones and subnets.

1. Verify that **Enable Private DNS Name** is not selected.

1. For **Security group**, choose the security group that you want to use for your VPC. You can accept the default security group. Verify that all of the following TCP ports are allowed in your security group:
   + TCP 443
   + TCP 1026
   + TCP 1027
   + TCP 1028
   + TCP 1031
   + TCP 2222

1. Choose **Create endpoint**. The initial state of the endpoint is **pending**. When the endpoint is created, note the ID of the VPC endpoint that you just created.

1. When the endpoint is created, choose **Endpoints**, then choose the new VPC endpoint.

1. In **Details** tab of the selected storage gateway endpoint, under **DNS Names**, use the first DNS name that doesn't specify an Availability Zone. Your DNS name look similar to this: `vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com `

Now that you have a VPC endpoint, you can create your gateway. For more information, see [Creating a Gateway](https://docs.aws.amazon.com/storagegateway/latest/tgw/create-gateway-vtl.html).