Restoring EFS using boto3 client does not work if EFS has already been restored once

0

Hello,

I have been playing with EFS backup and restore and using python boto3 client for all the operations. I came across an edge-case scenario where EFS restore does not work. Below are the steps (all operations were done using python boto3 client unless explicitly mentioned)

  • I created an EFS backup. I then used the recovery point ARN to restore it back to the same file system by calling start_restore_job(). This created a restore job which successfully completed and created a separate restore directory on the file system
  • I then deleted the restored directory from the file system.
  • I then called start_restore_job() again using the same recovery point ARN and to the same file system. I expected it to create a new restore job, however it failed with error "An error occurred (InvalidParameterValueException) when calling StartRestoreJob operation: Restore job xyz already finished". xyz is the same restore job that was created in the first step. Looks like it does not create a new restore job if one has already completed successfully.
  • I then ran the restore operation from the console and it did create a new restore job as expected.

I am not sure whether this is a bug with boto3 client or the API itself, but I should be allowed to run multiple restores for the same recovery point ARN.

질문됨 2년 전517회 조회
1개 답변
0
수락된 답변

Reposting from Aram Koukia's comment:

Did you provide the IdempotencyToken? If you want to initiate a new Restore Job, you need to provide a new IdempotencyToken when making the API call.

https://docs.aws.amazon.com/aws-backup/latest/devguide/API_StartRestoreJob.html#API_StartRestoreJob_RequestSyntax

StartRestoreJob API documentation: https://docs.aws.amazon.com/aws-backup/latest/devguide/API_StartRestoreJob.html

AWS
답변함 2년 전
  • Yes, I did not provide the IdempotencyToken. It works now after providing the token value.

    Thanks for the help

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠