Why doesn’t the backup of my FSx for ONTAP volume show the tags on the volume?

3 minute read
0

I want my backups to show the tags on my Amazon FSx for NetApp ONTAP volumes.

Resolution

By default, backups created for Amazon FSx for ONTAP file systems don't retain volume tags. To turn on the CopyTagsToBackups feature, complete the following steps:

1.    To confirm that the CopyTagsToBackups parameter is set to true for the volume, run the describe-volumes AWS Command Line Interface (AWS CLI) command.

Note: If you receive errors when running AWS CLI commands, make sure that you're using the most recent version of the AWS CLI.

In the following example command, replace 0123456789 with the correct name for your volume.

$ aws fsx describe-volumes --volume-ids fsvol-0123456789 

The following example output shows that the CopyTagsToBackups parameter is set to false.

{
    "Volumes": [
        {
                 ...................... 
                 ...................... 
                "CopyTagsToBackups": false
            },
             ......................
            ...................... 
            "VolumeType": "ONTAP"
        }
    ]
}

2.    To edit the CopyTagsToBackups parameter, run the update-volume AWS CLI command.

Note: The update-volume command copies tags to automatic backups. Tags specified during a user-initiated backup aren't copied from the volume even if you set the CopyTagsToBackups parameter to true. This includes the name tags entered for backups that you create from the Amazon FSx Console.

In the following example command, replace fsvol-0123456789 with the correct name for your volume.

$ aws fsx update-volume --volume-id fsvol-0123456789 --ontap-configuration CopyTagsToBackups=true

Example output

{
    "Volumes": [
        {
                 ...................... 
                 ...................... 
                "CopyTagsToBackups": true
            },
             ......................
            ...................... 
            "VolumeType": "ONTAP"
        }
    ]
}

After you set the CopyTagsToBackups parameter to true, tags are updated for automatic backups.

Manually tag existing backups without tags manually

Tag an existing backup from the Amazon FSx console

Open the Amazon FSx Console.

Choose Backups.

Make sure that you select the correct AWS Region, and then select the backup ID.

In the Tags pane, select Edit. and then add your tags.

Tag an existing backup using the AWS CLI

1.    To confirm the resource ARN of your backup, run the describe-backups AWS CLI command and extract the resource ARN. In the following example command, replace backup-0123456789 with the ID of the backup that you want to tag:

$ aws fsx describe-backups --backup-ids backup-0123456789 --query 'Backups[0].ResourceARN'

2.    To tag the backup, run the tag-resource AWS CLI command. In the following example command, replace the value of --resource-arn with the ARN extracted from the previous command and the key and value for your tag:

$ aws fsx tag-resource --resource-arn arn:aws:fsx:region:accountid:backup/backup-id --tags Key=Key_Name,Value=Value_Name

Related information

Tagging your resources

Copying tags to backups

AWS OFFICIAL
AWS OFFICIALUpdated a year ago