简体   繁体   中英

S3 move pattern between two buckets fails to capture files

We have a super big bucket called backup at work that contains all of our SQL Dumps for like the last 4 years on a hourly basis... That is about 29000 backups. But the problem is we have other files in there that we backup such as user uploads. Now we want to duplicate our backup bucket to another bucket, thats easy, do a "sync" and voila.

The problem i'm having is trying to move all the SQL dumps to a new bucket called dumps. I tried different combinations of command line params and none seem to output anything...

aws s3 mv s3://company.backup/ s3://company.dumps/ --exclude "*" --include "dump*" --dryrun

So here are the facts

  • The bucket names are valid
  • If i use "ls" with similar structure, it does output something
  • If i run commands file by file manually they work

What am i missing here?

使用--recursive标志如下,这应该可以解决问题

aws s3 mv s3://company.backup/ s3://company.dumps/ --exclude "*" --include "dump*" --recursive --dryrun

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM