# S3 sync does not work

**URL:** <https://forum.storj.io/t/s3-sync-does-not-work/16220>\
**Category:** troubleshooting\
**Created:** [November 24, 2021, 12:24am UTC](https://forum.storj.io/t/s3-sync-does-not-work/16220 "2021-11-24T00:24:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubotor](https://storj.bcdn.literatehosting.com/letter_avatar/kubotor/32/6_449c533f586939b6e5f246632a46421f.png) [@kubotor](https://forum.storj.io/u/kubotor)\
**Post date:** [November 24, 2021, 12:24am UTC](https://forum.storj.io/t/s3-sync-does-not-work/16220/1 "2021-11-24T00:24:26Z")

</div>

It just won’t skip the files already present in my storj bucket. It copies them every time over the network.

I’ve used: `aws s3 --endpoint=https://gateway.eu1.storjshare.io sync --size-only --delete /mnt/foo s3://bar/bar/`

No matter if I use `--size-only` or `--delete`. I will transfer the file every time.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [November 24, 2021, 7:51am UTC](https://forum.storj.io/t/s3-sync-does-not-work/16220/2 "2021-11-24T07:51:26Z")

</div>

Yes, it’s not preserve the modification time, so the object will be always new.

I would recommend to use `rclone sync` instead. The [`rclone`](https://docs.storj.io/dcs/how-tos/sync-files-with-rclone) preserve the modification time unlike AWS CLI.  
If you would choose the s3 protocol again, then you would need to use `rclone --no-update-modtime sync`.

---

<div class="post-metadata">

**Author:** ![kubotor](https://storj.bcdn.literatehosting.com/letter_avatar/kubotor/32/6_449c533f586939b6e5f246632a46421f.png) [@kubotor](https://forum.storj.io/u/kubotor)\
**Post date:** [November 27, 2021, 12:00pm UTC](https://forum.storj.io/t/s3-sync-does-not-work/16220/3 "2021-11-27T12:00:07Z")

</div>

Great, it is working! Thank you.  
But I used S3 (again) over rclone, because it eats 1:1 data on upload.

Now unchanged files are skipped.

---

<div class="post-metadata">

**Author:** ![ALFRED123](https://storj.bcdn.literatehosting.com/letter_avatar/alfred123/32/6_449c533f586939b6e5f246632a46421f.png) [@ALFRED123](https://forum.storj.io/u/ALFRED123)\
**Post date:** [May 30, 2022, 5:43pm UTC](https://forum.storj.io/t/s3-sync-does-not-work/16220/4 "2022-05-30T17:43:22Z")

</div>

This script synchronizes local directory with storj directory with uplink  
It does not add, remove, or update any file in the local directory  
It does not remove or update any file in the remote directory .  
It just copies new files from local directory to remote storj directory  
It just check filename and filepath, not file size or file date creation

#example  
python3 ./synchronize\_storj.py --local\_dir /dir6565/dir773 --remote\_dir sj://bucket\_845/dir747/dir334 --mode\_test\_or\_real real --show\_new\_files\_yes\_or\_not not

> <https://github.com/financebot/synchronize_storj_with_uplink/blob/93e39e70b7953493d85d3dba8b2abe180d5a2eb7/synchronize_storj.py>
