2 Antworten
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
1
From the CLI consider using --recursive --exclude "*/*" this should prevent copying of any objects with a / in the key which you can use to indicate a sub-folder. Be aware that this will process every object in the source location as it will need to determine if the key contains the exclude pattern.
Further info at Use of Exclude and Include Filters
beantwortet vor 2 Jahren
0
@Rob - after seeing it not work, I tried a few --exclude combinations and got it, then re-visited the post/my command and neglected the *, so re-tested and worked perfect!
Thanks much, this was an easy / yet annoying one!
beantwortet vor 2 Jahren
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren
Thanks @RoB - unfortunately, didn't work. I didn't get an error, however it did move the root folders;
command: aws s3 mv s3://bucket/documents/00000154/ s3://bucket/documents/00000154/archive/ —recursive —exclude “/”
result: move: s3://bucket/documents/00000154/Index/_2j.fdx to s3://bucket/documents/00000154/archive/Index/_2j.fdx
Naturally there were hundreds of the root that did move, but I had 2 folders in the root that got moved into the archive folder.