deajan / osync

A robust two way (bidirectional) file sync script based on rsync with fault tolerance, POSIX ACL support, time control and near realtime sync
http://www.netpower.fr/osync
BSD 3-Clause "New" or "Revised" License
924 stars 99 forks source link

Folder Time on master not synced in slave to master sync #227

Open kingofcamel opened 3 years ago

kingofcamel commented 3 years ago

First of all, thanks for the great work.

I have the following issue on two Deb10 systems with : the replication runs from master to slave fine, it updates files and dir times. But the replication from slave to master only updates file time and not the folder time containing the synced file.

Master > Slave = File and Dir time synced if file was created or modified Slave > Master = File time synced if file was created or modified, Dir time not modified

I’m running the latest verion of this script and the Deb Systems are current Maybe i'm only missing a rsync parameter wthich i did not find.

Can you help?

deajan commented 3 years ago

Sorry for the late answer. If this is still an issue, please provide me with some details (osync version, anonymized config file, relevant server config, ie filesystems)

kingofcamel commented 3 years ago

Hi

The version is the latest version and the config file is attached. filesystem is ext4 with acl on master and slave. the "Modifiziert" timestamp is the faulty one. below are some stat's of the folders dates

slave:

root@slave:/testfolder# stat zverz Datei: zverz Größe: 4096 Blöcke: 16 EA Block: 4096 Verzeichnis Gerät: 811h/2065d Inode: 13632435 Verknüpfungen: 2 Zugriff: (2770/drwxrws---) Uid: ( 0/ root) Gid: (1303527/ usergrp) Zugriff : 2021-05-11 16:42:53.345748232 +0200 Modifiziert: 2021-05-11 16:36:52.162420280 +0200 Geändert : 2021-05-11 16:42:50.841753001 +0200 Geburt : -

 A file is created and saved in this folder. Time is updated and correct on local filesystem for file and folder

root@slave:/testfolder# stat zverz Datei: zverz Größe: 4096 Blöcke: 16 EA Block: 4096 Verzeichnis Gerät: 811h/2065d Inode: 13632435 Verknüpfungen: 2 Zugriff: (2770/drwxrws---) Uid: ( 0/ root) Gid: (1303527/ usergrp) Zugriff : 2021-05-11 16:42:53.345748232 +0200 Modifiziert: 2021-05-11 16:48:45.142155271 +0200 Geändert : 2021-05-11 16:48:45.142155271 +0200 Geburt : -

 Now the sync runs on master. File from salve is transferred correct to master, filetime is ok. Foldertime is ok for a little moment, then is time taken from master for slave folder.

root@slave:/testfolder# stat zverz Datei: zverz Größe: 4096 Blöcke: 16 EA Block: 4096 Verzeichnis Gerät: 811h/2065d Inode: 13632435 Verknüpfungen: 2 Zugriff: (2770/drwxrws---) Uid: ( 0/ root) Gid: (1303527/ usergrp) Zugriff : 2021-05-11 16:49:38.725492276 +0200 Modifiziert: 2021-05-11 16:36:52.162420280 +0200 Geändert : 2021-05-11 16:49:36.157522962 +0200 Geburt : - root@slave:/testfolder#

master:

root@master:/testfolder# ls -al zverz insgesamt 40 drwxrws---+ 2 root usergrp 4096 Mai 11 16:36 . drwxrws--T+ 26 TestUser usergrp 4096 Apr 26 11:10 .. -rw-rw----+ 1 root usergrp 9 Mai 11 16:41 test2 -rw-rw----+ 1 root usergrp 10 Mai 11 16:48 test3 -rw-rw----+ 1 root usergrp 12 Mai 11 16:39 tfile

 Time of transferred file is ok

root@master:/testfolder# stat zverz Datei: zverz Größe: 4096 Blöcke: 16 EA Block: 4096 Verzeichnis Gerät: 811h/2065d Inode: 11798936 Verknüpfungen: 2 Zugriff: (2770/drwxrws---) Uid: ( 0/ root) Gid: (1303527/ usergrp) Zugriff : 2021-05-11 16:49:42.958750135 +0200 Modifiziert: 2021-05-11 16:36:52.162420280 +0200 Geändert : 2021-05-11 16:49:39.578750115 +0200 Geburt : - root@master:/testfolder#

 On Master the old folder time is still present config-file.txt