쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

Setting up a custom snapshot schedule

포커스 모드
Setting up a custom snapshot schedule - FSx for OpenZFS
이 페이지는 귀하의 언어로 번역되지 않았습니다. 번역 요청

You can set up a automated custom snapshot schedule for FSx for OpenZFS volumes using the resources and configuration template provided in this topic. The custom snapshot scheduling solution performs user-initiated snapshots of your Amazon FSx volumes on a custom schedule that you define. For example, you can configure a custom schedule to take a snapshot every hour and automatically delete snapshots that are older than two days.

For more information on CRON schedule patterns, see Schedule expressions for rules in the Amazon CloudWatch Events User Guide.

Architecture overview

Deploying this solution builds the following resources in the AWS Cloud:

Diagram showing the custom snapshot schedule AWS CloudFormation template.

The diagram illustrates the following custom snapshot schedule workflow:

  1. The solution AWS CloudFormation template deploys an CloudWatch Event, an AWS Lambda function, an Amazon Simple Notification Service (Amazon SNS) queue, and an IAM role. The IAM role gives the Lambda function permission to invoke the necessary Amazon FSx API operations.

  2. The CloudWatch event runs on a schedule you define as a CRON pattern, during the initial deployment. This event invokes the solution’s snapshot manager Lambda function that invokes the Amazon FSx CreateSnapshot API operation to initiate a snapshot.

  3. The snapshot manager retrieves a list of existing user-initiated snapshots for the specified volume using DescribeSnapshots. It then deletes snapshots older than the retention period, which you specify during the initial deployment.

  4. The snapshot manager sends a notification message to the Amazon SNS queue on a successful snapshot if you choose the option to be notified during the initial deployment. A notification is always sent in the event of a failure.

Required permissions

The following permissions are required to use the custom snapshot schedule AWS CloudFormation template:

  • AWSCloudFormationFullAccess

  • AmazonS3FullAccess

  • AmazonEventBridgeFullAccess

  • IAMFullAccess

  • AmazonSNSFullAccess

  • AWSKeyManagementServicePowerUser

  • AWSLambda_FullAccess

AWS CloudFormation template

This solution uses AWS CloudFormation to automate the deployment of the Amazon FSx custom snapshot scheduling solution. To use this solution, download the fsx-openzfs-scheduled-snapshot.template AWS CloudFormation template.

Automated deployment

The following procedure configures and deploys this custom snapshot scheduling solution. It takes about five minutes to deploy. Before you start, you must have the ID of a volume on an Amazon FSx file system running in an Amazon Virtual Private Cloud (Amazon VPC) in your AWS account. For more information on creating these resources, see Creating an Amazon FSx for OpenZFS volume.

Note

Implementing this solution incurs billing for the associated AWS services. For more information, see the pricing details pages for those services.

To launch the custom snapshot solution stack
  1. Download the fsx-openzfs-scheduled-snapshot.template AWS CloudFormation template. For more information on creating an AWS CloudFormation stack, see Creating a stack on the AWS CloudFormation console in the AWS CloudFormation User Guide.

    Note

    By default, this template launches in the US East (N. Virginia) AWS Region. Amazon FSx for OpenZFS is currently only available in specific AWS Regions. You must launch this solution in an AWS Region where FSx for OpenZFS is available. For more information, see Amazon FSx endpoints and quotas in the AWS General Reference.

  2. For Parameters, review the parameters for the template and modify them for the needs of your file system volumes. This solution uses the following default values.

    Parameter Default Description
    FSx for OpenZFS resource ID No default value The file system ID or volume ID on which the snapshot schedule will apply. If you provide a file system ID, the schedule will take snapshots of all volumes within that file system.
    CRON schedule pattern for snapshots

    0 0/6 * * ? *

    [Every 6 hours]

    The schedule to run the CloudWatch event, triggering a new snapshot and deleting old snapshots outside of the retention period.
    Snapshot retention (days) 7 The number of days to keep user-initiated snapshots. The Lambda function deletes user-initiated snapshots older than this number of days.
    Name for snapshots User-scheduled_snapshot The name for these snapshots, which appears in the Snapshot Name column of the Amazon FSx Management Console.
    Snapshot Notification Yes Choose whether to be notified when snapshots are successfully initiated. A notification is always sent if there's an error.
    Email address No default value The email address to use in subscribing to the SNS notifications.
  3. Choose Next.

  4. For Options, choose Next.

  5. For Review, review and confirm the settings. Select the check box acknowledging that the template creates IAM resources.

  6. Choose Create to deploy the stack.

You can view the status of the stack in the AWS CloudFormation console in the Status column. You should see a status of CREATE_COMPLETE in about five minutes.

Additional options

You can use the Lambda function created by this solution to perform custom scheduled snapshots of more than one FSx for OpenZFS volume. The volume ID is passed to the Amazon FSx function in the input JSON for the CloudWatch event. The default JSON passed to the Lambda function is as follows, where the values for VolumeId and SuccessNotification are passed from the parameters specified when launching the AWS CloudFormation stack.

{ "start-snapshot": "true", "purge-snapshots": "true", "volume-id": "${VolumeId}", "notify_on_success": "${SuccessNotification}" }

To schedule snapshots for an additional FSx for OpenZFS volume, create another CloudWatch event rule. You do so using the Schedule event source, with the Lambda function created by this solution as the target. Choose Constant (JSON text) under Configure Input. For the JSON input, simply substitute the volume ID of the FSx for OpenZFS volume to back up in place of ${VolumeId}. Also, substitute either Yes or No in place of ${SuccessNotification} in the JSON above.

Any additional CloudWatch Event rules you create manually aren't part of the AWS CloudFormation stack for the Amazon FSx custom scheduled snapshot solution. Thus, they aren't removed if you delete the stack.

이 페이지에서

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.