minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

What is the principle of mc mirror monitoring local file changes? #4805

Closed DengLZ closed 10 months ago

DengLZ commented 10 months ago

Operating procedures

I execute the command to synchronize the data in the local aa directory to the s3 bucket. I terminated the command after the data synchronization was completed. Then I modified the contents of the /tmp/aaa directory. After 20 minutes I restarted the command. The modifications I made after terminating the command were still synchronized to the s3 bucket.

mc mirror -w --overwrite --remove --preserve /tmp/aa obs_sys-test1/sys-test1/aa

My Question

I would like to know how the mc client implements this function. Why can only modified information be synced without a full sync.

Is it because the mc client records the status information of local files? Or the mc client can only detect changes within a period of time?

mc --version

System information

centos 7.9

vadmeste commented 10 months ago

@DengLZ I tried to replicate your setup, modifying a file with an editor will successfully replicate a file. The code uses this library https://github.com/rjeczalik/notify to get notified about changes in a file before replicating it.

harshavardhana commented 10 months ago

CentOS 7.9 is a dead OS, please use something that is not EOLed and report issues please.