在将前缀为“ LOAD *”的文件从亚马逊s3同步到Google云存储时,我遇到了一个问题,并且我也希望将它们也从数据完整性检查中排除。
我已经尝试了gsutils rsync帮助中提到的-x方法,但文件并未被排除,并且仍在检查要排除的文件。
用例:
有什么方法可以实现这一目标?
命令:
gsutil -m rsync -Cnr -x "dirX/dirY/.*/LOAD*$" s3://bucket-A gs://bucket-B
输出:
Building synchronization state...
At destination listing 10000...
At destination listing 20000...
At destination listing 30000...
At destination listing 40000...
At destination listing 50000...
At destination listing 60000...
At destination listing 70000...
At destination listing 80000...
Non-MD5 etag ("1f46bed70ce51ad32c271f423463c1f8-2") present for key <Key: bucket-A,dirX/dirY/dir1/LOAD00000001.csv>, data integrity checks are not possible.
At destination listing 90000...
At destination listing 100000...
At destination listing 110000...
At destination listing 120000...
At destination listing 130000...
At destination listing 140000...
At destination listing 150000...
At destination listing 160000...
At destination listing 170000...
Non-MD5 etag ("46a7c3d9e894d6e6a6437a97b49815a5-31") present for key <Key: faasos-etl,bucket-A,dirX/dirY/dir2/LOAD00000001.csv>, data integrity checks are not possible.
目录结构如下:
bucketA/dirX/dirY/dir1/LOAD000001.csv
bucketA/dirX/dirY/dir1/LOAD000002.csv
bucketA/dirX/dirY/dir2/LOAD000001.csv
bucketA/dirX/dirY/dir2/LOAD000002.csv
bucketA/dirX/dirY/dirN/LOAD000001.csv
答案 0 :(得分:1)
您使用的正则表达式与目录中的文件不匹配。尝试以下方法:
gsutil -m rsync -Cnr -x "dirX/dirY/.*/LOAD.*$" s3://bucket-A gs://bucket-B