2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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
répondu il y a 2 ans
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!
répondu il y a 2 ans
Contenus pertinents
- demandé il y a 2 mois
- demandé il y a 6 mois
- demandé il y a un an
- demandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a 8 mois
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.