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.

posta 2 anni fa522 visualizzazioni
1 Risposta
0
Risposta accettata

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
con risposta 2 anni fa
  • Yes, I did not provide the IdempotencyToken. It works now after providing the token value.

    Thanks for the help

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande