Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to synchronize timestamps #485

Open
eauchat opened this issue Mar 26, 2024 · 2 comments
Open

Ability to synchronize timestamps #485

eauchat opened this issue Mar 26, 2024 · 2 comments

Comments

@eauchat
Copy link

eauchat commented Mar 26, 2024

I'm using mutagen 0.17.5 to synchronize some directories between a linux laptop and linux server (both debian based).
Synchronization is working well, but when I close it for a while and make modifications to both sides, it's simpler and more reliable for me to use rsync to resolve conflicts manually, before restarting mutagen.
The issue is that rsync watch timestamps and wants to synchronize everything, to correct inappropriate timestamps. Which makes it inconvenient to identify real modifications. I could ask rsync to ignore timestamps, but it's not ideal for various reasons.

So I was wondering why mutagen does not synchronize timestamps, or if there is an option I didn't find to have it do it.
I searched extensively, but somehow didn't find relevant info on this aspect. But maybe I didn't search in the right places.

Thanks for your attention, and thanks for the great tool you've created.

@scruel
Copy link

scruel commented Mar 28, 2024

Along with other metadata info like owner, group, ACLs, xattr, etc.

@scruel
Copy link

scruel commented Mar 28, 2024

Workaround (only owner/access/timestamp, on the same machine):

SOURCE=$1
TARGET=$2

find "$SOURCE" $@ -print0 | while IFS= read -r -d '' file; do
  rel_path="${file#$SOURCE}"
  target_path="$TARGET$rel_path"
  echo $target_path
  if [ -e "$target_path" ]; then
    echo 1
    #touch -r "$file" "$target_path"
    #chown --reference="$file" "$target_path"
    #chmod --reference="$file" "$target_path"
  fi
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants