amazon web services - Move files to S3 then remove source files after completion -


i familiarising myself amazon web services , s3 aws cli.

does know if it's possible remove files source exist on destination bucket?

i trying below:

aws s3 sync /home/recsout s3://myfakebucketname001 --delete 

i using rsync nas drive --remove-source-files want use s3 , aws cli instead.

the aws s3 sync command in aws command-line interface (cli) used synchronize source target. it not delete files source after copying. however, --delete option remove files target if not present in source (thereby making target match source).

if intent copy file , remove it, use aws s3 mv command, copies , removes source.

also, it's worth mentioning aws s3 commands can work local disk amazon s3 bucket, or s3 bucket local disk, or between 2 s3 buckets.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -