2 Risposte
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
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
con risposta 2 anni fa
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!
con risposta 2 anni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un anno fa
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.