Skip to content

Commit

Permalink
feat: update s5cmd-sync usage
Browse files Browse the repository at this point in the history
  • Loading branch information
catusax committed Jul 21, 2023
1 parent e22c61c commit 7ad4a15
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
23 changes: 22 additions & 1 deletion s5cmd-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,30 @@ sync your files to s3 storage using s5cmd
docker run -it --rm \
-e AWS_ACCESS_KEY_ID=4e9a01106 \
-e AWS_SECRET_ACCESS_KEY=5de0703e54e9 \
-e S5CMD_ENDPOINT=https://bff48b41b.r2.cloudflarestorage.com \
-e S3_ENDPOINT_URL=https://bff48b41b.r2.cloudflarestorage.com \
-e S5CMD_DESTINATION=s3://my-bucket/tttt/ \
-e S5CMD_DELETE=true \
-v /home/demo/test:/aws \
ghcr.io/linuxhub-group/s5cmd-sync/s5cmd-sync
```

## usage

mount your directory to be synchronized to `/aws`,and run the docker container `ghcr.io/linuxhub-group/s5cmd-sync/s5cmd-sync`.

### ENVIRONMENT

- `S3_ENDPOINT_URL` ,`required`: S3 API compatible service endpoint
- `AWS_ACCESS_KEY_ID` ,`required`: access key
- `AWS_SECRET_ACCESS_KEY` ,`required`: secret access key
- `S5CMD_DESTINATION` ,`required`: destination bucket, e.g. s3://my-bucket/tttt/

- `AWS_PROFILE` : AWS profile
- `AWS_REGION` : AWS region

- `CRON_SCHEDULE` : cron scheduler (unix-cron), default is every minute: "* * * * *"
- `S5CMD_SSE` : perform server side encryption of the data at its destination, e.g. aws:kms
- `S5CMD_SSE_KMS_KEY_ID` : customer master key (CMK) id for SSE-KMS encryption; leave it out if server-side generated key is desired
- `S5CMD_EXPIRES` : set expires for target (uses RFC3339 format): defines expires header for object, e.g. cp --expires '2024-10-01T20:30:00Z'
- `S5CMD_DELETE` : delete objects in destination but not in source (default: false)
- `S5CMD_EXCLUDES` : exclude objects with given pattern (accepts multiple inputs), e.g: "--exclude *.env --exclude abc"
4 changes: 0 additions & 4 deletions s5cmd-sync/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
SYNCOPTIONS=""
OPTIONS=""

if [ -n "$S5CMD_ENDPOINT" ]; then
OPTIONS="${OPTIONS} --endpoint-url $S5CMD_ENDPOINT"
fi

if [ -n "$S5CMD_SSE" ]; then
SYNCOPTIONS="${SYNCOPTIONS} --sse $S5CMD_SSE"
fi
Expand Down

0 comments on commit 7ad4a15

Please sign in to comment.