Sample Header Ad - 728x90

Check if file exists in S3 Bucket

11 votes
5 answers
52856 views
This directory /data/files/ has thousands files like: 1test 2test 3test [...] 60000test 60001test I'm also sending them to a S3 Bucket (AWS), using AWS CLI. However, sometimes the S3 bucket can be offline and because of that the file is skipped. How can I check if the file that exists in /data/files/ is also in the S3 Bucket? and if not copy the missing file to S3? I would prefer to do this using BASH. Also if I need to change the AWS CLI for another one, can be.
Asked by Patrick B. (219 rep)
Jan 23, 2017, 10:16 PM
Last activity: Mar 24, 2020, 06:18 AM