You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'd just like to know what's the progress on this feature. Is anybody planning to work on this soon, or is it a low priority? Is there anything I can help with, without speaking Go? As far as I see, compared to a unidirectional sync, this would require keeping a full listing of the last known synced state, in order to figure out where a rename took place.
For context, my use case would be keeping a directory on my phone in sync with a NextCloud server, where files can be added, deleted and renamed/moved on both ends. My options seem to be a) finding a software solution that supports this, b) renting a (twice as expensive) server I can run Syncthing on, c) writing a Python script myself. Rclone seems to be close to a), hence I'm curious. By no means I intend to beg anyone to implement this feature sooner!
Hello, I'd just like to know what's the progress on this feature. Is anybody planning to work on this soon, or is it a low priority?
@f0k I just submitted a PR that should significantly improve this (albeit in a slightly different way.) Files and folders can now be renamed on both sides without needing to re-upload, or do a --resync, or end up with erroneous ..path1 and ..path2 versions. (However, the behavior is unchanged when a rename is on only one side.)
Nice! However, if I understand correctly, this does not help when a file is renamed only on one side and I would like the change to propagate to the other side without incurring a retransmission.
Nice! However, if I understand correctly, this does not help when a file is renamed only on one side and I would like the change to propagate to the other side without incurring a retransmission.
You are correct.
As a note to anyone revisiting this later (possibly me), I think the technical limitation currently is that --track-renames doesn't work with copy, only sync. Whereas bisync uses copy to transfer the queued files to the opposite path, and then it does the queued deletes in a later step. Here's the line where it calls CopyDir:
fs.Errorf(fdst, "Ignoring --track-renames as it doesn't work with copy or move, only sync")
s.trackRenames=false
}
I think it should be possible (and desirable) to support --track-renames for bisync, but it would take a bit of rethinking about how bisync queues work.
Activity
f0k commentedon Oct 8, 2022
Hello, I'd just like to know what's the progress on this feature. Is anybody planning to work on this soon, or is it a low priority? Is there anything I can help with, without speaking Go? As far as I see, compared to a unidirectional sync, this would require keeping a full listing of the last known synced state, in order to figure out where a rename took place.
For context, my use case would be keeping a directory on my phone in sync with a NextCloud server, where files can be added, deleted and renamed/moved on both ends. My options seem to be a) finding a software solution that supports this, b) renting a (twice as expensive) server I can run Syncthing on, c) writing a Python script myself. Rclone seems to be close to a), hence I'm curious. By no means I intend to beg anyone to implement this feature sooner!
nielash commentedon Jul 12, 2023
@f0k I just submitted a PR that should significantly improve this (albeit in a slightly different way.) Files and folders can now be renamed on both sides without needing to re-upload, or do a
--resync, or end up with erroneous..path1and..path2versions. (However, the behavior is unchanged when a rename is on only one side.)f0k commentedon Jul 12, 2023
Nice! However, if I understand correctly, this does not help when a file is renamed only on one side and I would like the change to propagate to the other side without incurring a retransmission.
nielash commentedon Jul 12, 2023
You are correct.
As a note to anyone revisiting this later (possibly me), I think the technical limitation currently is that
--track-renamesdoesn't work withcopy, onlysync. Whereasbisyncusescopyto transfer the queued files to the opposite path, and then it does the queued deletes in a later step. Here's the line where it callsCopyDir:rclone/cmd/bisync/queue.go
Line 26 in 415f4b2
which then calls
runSyncCopyMovewithfs.DeleteModeOffhard-coded:rclone/fs/sync/sync.go
Lines 1141 to 1144 in 415f4b2
fs.DeleteModeOffprecludes--track-renames:rclone/fs/sync/sync.go
Lines 208 to 211 in 415f4b2
I think it should be possible (and desirable) to support
--track-renamesforbisync, but it would take a bit of rethinking about howbisyncqueues work.bisync: merge copies and deletes -- fixes rclone#5690
4 remaining items
bisync: merge copies and deletes, support --track-renames and --backu…
bisync: merge copies and deletes, support --track-renames and --backu…