s3cmd - Moving files within amazon s3 bucket -


I uploaded the file to s3 bucket. But due to my mistake, s3cmd s3: // backup / files / bkup14 Instead of uploaded files on s3: // backup / bkup14. Now to move all the files under s3: // backup / files / bkup14 to s3: // backup / bkup14, I tried the command:

s3cmd mv --recursive s3 : // backup / files / bkup14 s3: // backup / bkup14

but it gives me the error below:

  Error: S3 error: 400 (Invalid request): This copy request is invalid because it is a copy of an object without changing the object's metadata, storage class, website redirect location or encryption attributes Trying to create.  

Am I doing wrong here? Can anyone suggest me?

Try first sync (first pig-run first):

  s3cmd sync s3: // backup / files / bkup14 / s3: // backup / bkup14 / - draw-run s3cmd sync s3: // backup / files / bkup14 / s3: // backup / bkup14 /  

Then delete the folder which is no longer required:

  s3cmd del --recursive s3: // backups / files / bkup14 --dry -ro s3cmd Del --recursive s3: // backups / files / bkup14  

The AWS S3 bucket is shared by all users of the namespace system, so long as you are baking Do not be too fortunate to be afraid Backup Bucket Your S # Bucket is the most anything else.

Below is an example of testing and proven.

  s3cmd sync s3: // backups-stackoverflow-demo / files / bkup14 / s3: // backups-stackoverflow-demo / bkup14 / -dry-run Summary: 1 source files to copy For, 0 files to destination to delete sync: s3: // backup-stack overflow-demo / files / bcup 14 / test. TTT - & gt; S3: //backups-stackoverflow-demo/bkup14/test.txt Warning: -dry-run s3cmd Sync s3: // backups-stackoverflow-demo / files / bkup14 / s3: backup-stack overflow-demo / bcup 14 / summary : 1 source file to copy, 0 files to delete file s3: //backups-stackoverflow-demo/files/bkup14/test.txt has been copied s3: // backups-stackoverflow-demo / bkup14 / Test.txt happened in 0.1 seconds 1 files copied, 16.72 files / s s3cmd del --recursive s3: // backups-stackoverflow-demo / files / bkup14 - Delete Draw-Run: s3: // backups-stackoverflow-demo / Files / bkup14 / Delete: s3: //backups-stackoverflow-demo/files/bkup14/test.txt Warning: - Draw-run s3cmd del -recursive s3: Exit now because of backup-stackworflow-demo / file / bcup 14 file s3: // backup-stack overflow-demo / file / bcup 14 / deleted file s3: // backups-stackoverflow-demo / Files / bkup14 / test.txt deleted  

Comments