s3_upload_config.ini 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [Basic]
  2. JobType = LOCAL_TO_S3
  3. # 'LOCAL_TO_S3' | 'S3_TO_S3' | 'ALIOSS_TO_S3'
  4. DesBucket = my-bucket
  5. # Destination S3 bucket name
  6. # 目标文件bucket, type = str
  7. S3Prefix = my-prefix
  8. # S3_TO_S3 mode Src. S3 Prefix, and same as Des. S3 Prefix; LOCAL_TO_S3 mode, this is Des. S3 Prefix.
  9. # S3_TO_S3 源S3的Prefix(与目标S3一致),LOCAL_TO_S3 则为目标S3的Prefix, type = str
  10. SrcFileIndex = *
  11. # Specify the file name to upload. Wildcard "*" to upload all.
  12. # 指定要上传的文件的文件名, type = str,Upload全部文件则用 "*"
  13. DesProfileName = default
  14. # Profile name config in ~/.aws credentials. It is the destination account profile.
  15. # 在~/.aws 中配置的能访问目标S3的 profile name
  16. [LOCAL_TO_S3]
  17. SrcDir = /home/ec2-user/mydir
  18. # Source file directory. It is useless in S3_TO_S3 mode
  19. # 原文件本地存放目录,S3_TO_S3 则该字段无效 type = str
  20. [S3_TO_S3]
  21. SrcBucket = my-src-bucket
  22. # Source bucket name. It is useless in LOCAL_TO_S3 mode.
  23. # 源Bucket,LOCAL_TO_S3 则本字段无效
  24. SrcProfileName = iad
  25. # Profile name config in ~/.aws credentials. It is the source account profile. Useless for LOCAL_TO_S3 mode.
  26. # 在~/.aws 中配置的能访问源S3的 profile name,LOCAL_TO_S3 则本字段无效
  27. [ALIOSS_TO_S3]
  28. ali_SrcBucket = img-process
  29. ali_access_key_id = xxxx
  30. ali_access_key_secret = xxx
  31. ali_endpoint = oss-cn-beijing.aliyuncs.com
  32. [Advanced]
  33. ChunkSize = 5
  34. # File chunksize, unit MBytes, not less than 5MB. Single file parts number < 10,000, limited by S3 mulitpart upload API. The application will auto change it adapting to file size, you don't need to change it.
  35. # 文件分片大小,单位为MB,不小于5M,单文件分片总数不能超过10000, 所以程序会根据文件大小自动调整该值,你一般无需调整。type = int
  36. MaxRetry = 20
  37. # Max retry times while S3 API call fail.
  38. # S3 API call 失败,最大重试次数, type = int
  39. MaxThread = 5
  40. # Max threads for ONE file.
  41. # 单文件同时上传的进程数量, type = int
  42. MaxParallelFile = 5
  43. # Max paralle running file, i.e. concurrency threads = MaxParallelFile * MaxThread
  44. # 并行操作文件数量, type = int, 即同时并发的进程数 = MaxParallelFile * MaxThread
  45. StorageClass = STANDARD
  46. # 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER'|'DEEP_ARCHIVE'
  47. ifVerifyMD5 = False
  48. # Practice for twice MD5 for whole file.
  49. # If True, then after merge file, will do the second time of Etag MD5 for the whole file.
  50. # In S3_TO_S3 mode, this True will force to re-download all parts while break-point resume for calculating MD5, but not reupload the parts which already uploaded.
  51. # This switch will not affect the MD5 verification of every part upload, even False, it still verify very part's MD5.
  52. # 是否做这个文件的二次的MD5校验
  53. # 为True则一个文件完成上传合并分片之后再次进行整个文件的ETag校验MD5。
  54. # 对于 S3_TO_S3,该开关True会在断点续传的时候重新下载所有已传过的分片来计算MD5。
  55. # 该开关不影响每个分片上传时候的校验,即使为False也会校验每个分片MD5。
  56. DontAskMeToClean = False
  57. # If True: While there is unfinished upload, it will not ask you to clean the unfinished parts on Des. S3 or not. It will move on and resume break-point upload.
  58. # If True: 遇到存在现有的未完成upload时,不再询问是否Clean,默认不Clean,自动续传
  59. LoggingLevel = INFO
  60. # 'WARNING' | 'INFO' | 'DEBUG'