-
Notifications
You must be signed in to change notification settings - Fork 319
Open
Description
Description
The s5cmd sync --delete command successfully syncs files from source to destination, but does not delete files from the destination that have been removed from the source directory. The command completes without errors, but the --delete flag appears to have no effect.
Command Used
s5cmd --log debug sync --delete --acl public-read --destination-region my-region ./dist "s3://bucket-name/"Expected Behavior
When files are removed from the local ./dist directory, running s5cmd sync --delete should:
- Upload new/modified files from
./disttos3://bucket-name/ - Delete files from
s3://bucket-name/that no longer exist in./dist
Actual Behavior
- ✅ New and modified files are correctly uploaded to S3
- ❌ Files removed from
./distare not deleted from the S3 bucket - ✅ Command completes successfully (exit code 0)
- ✅ No error messages are logged
- ❌ Using the
--log debugI see that files are being copy, usingcpinstead ofsync(but probably is normal behaviour under the hood)
Environment
- s5cmd version: 2.3.0
- OS: Ubuntu (GitHub Actions
ubuntu-latest) - Source: Local directory
./dist(contains static web assets) - Destination: S3 bucket
s3://bucket-name/ - Authentication: using the same
aws-actions/configure-aws-credentials@v4
Comparison with AWS CLI
The equivalent aws s3 sync command works correctly:
aws s3 sync --delete ./dist "s3://bucket-name/"Additional Context
- The command is executed in a GitHub Actions workflow
- No
--excludeor--includepatterns are specified
Request
I know about your aws-cli compatibility disclaimer, I'm looking for help to understand if I'm doing something wrong here or is an already known issue. About permissions, can it work differently from aws-cli?
Thankss! 🙏
Metadata
Metadata
Assignees
Labels
No labels