1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

aws_datasync_taskでTransfer and verification completed. Verification detected mismatches. Files with mismatches are listed in Cloud Watch Logs

Last updated at Posted at 2022-04-21

事象

  • terraformでaws_datasync_taskでタスクを作成して実行したところ以下のエラーが発生しました。
Transfer and verification completed. Verification detected mismatches. 
Files with mismatches are listed in Cloud Watch Logs

CloudWatchLogを見ても以下のエラーが出ていてよくわかりませんでした。

[NOTICE] Verification failed < /zqvchszsCnDVlOLMEywArJHhGhNvxhDs.png

原因

  • DataSyncのタスク実行中に、Sync元にファイルが生成されてしまった為、タスク内のチェックでエラーが発生した。
  • aws_datasync_taskだとデータ検証オプション(verify_mode)のデフォルトがVerify all data in the destination(POINT_IN_TIME_CONSISTENT)となっていた為。

対応

  • 以下のようにverify_modeONLY_FILES_TRANSFERREDにした。
resource "aws_datasync_task" "default" {
  name                     = "something_name"
  source_location_arn      = aws_datasync_location_s3.source.arn
  destination_location_arn = aws_datasync_location_s3.destination.arn
  cloudwatch_log_group_arn = aws_cloudwatch_log_group.default.arn

  options {
    gid               = "NONE"
    posix_permissions = "NONE"
    uid               = "NONE"
    log_level         = "BASIC"
    verify_mode       = "ONLY_FILES_TRANSFERRED"
  }
}

See

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?