Description
a3a243d created the issue
I encountered an issue where duck.sh (version 7.4.1 (33065) on Ubuntu) removes files unexpectedly when using --synchronize
for Cryptomator vaults in S3.
How to replicate:
- create a cryptomator vault in S3
- Create a folder locally and add a few file
- Run
duck.sh --synchronize -e upload my_folder s3://my_bucket/my_vault/my_folder
- Add one more file locally
- Run
duck.sh --synchronize -e upload my_folder s3://my_bucket/my_folder
again - Files uploaded in step 3 are now missing
The commands I used (with any mention of credentials removed) are listed below:
mkdir /tmp/my_folder/
echo "Foo" > /tmp/my_folder/test1.txt
duck --region us-east-1 --vault my_bucket/my_vault/ --synchronize s3://s3.us-east-1.amazonaws.com/my_bucket/my_vault/ /tmp/my_folder --existing upload
Output: "Sync complete. my_folder ↔ my_folder…"
duck --region us-east-1 --vault my_bucket/my_vault/ -l s3://s3.us-east-1.amazonaws.com/my_bucket/my_vault/my_folder/
Output: "Listing directory my_folder... test1.txt"
echo "Bar" > /tmp/my_folder/test2.txt
duck --region us-east-1 --vault my_bucket/my_vault/ --synchronize s3://s3.us-east-1.amazonaws.com/my_bucket/my_vault/ /tmp/my_folder --existing upload
Output: "Sync complete. my_folder ↔ my_folder…"
duck --region us-east-1 --vault my_bucket/my_vault/ -l s3://s3.us-east-1.amazonaws.com/my_bucket/my_vault/my_folder/
Output: "Listing directory my_folder... test2.txt"
Additionally, I noticed that I am unable to use sync to download the contents of Cryptomator vaults from S3.
Entering the command:
duck --region us-east-1 --vault my_bucket/my_vault/ --synchronize s3://s3.us-east-1.amazonaws.com/my_bucket/my_vault/ /tmp/my_folder --existing download
Outputs: "Transfer incomplete. my_folder ↔ my_folder…"
I have entered variations of these sync commands with S3 buckets that are not in Cryptomator vaults and observed that duck does upload new files without deleting old files and does successfully download files with the --synchronize argument. The issue seems to only affect using --synchronize with Cryptomator vaults.