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

File versioning across drives #5419

Closed
Xylobol opened this issue Jan 1, 2019 · 6 comments

Comments

Projects
None yet
5 participants
@Xylobol
Copy link

commented Jan 1, 2019

I set Syncthing running on Windows to do Staggered File Versioning from D:\Synced\Music to H:\Syncthing History\Music, and it fails with "The system cannot move the file to a different disk drive." displayed in the Web GUI's Could not Sync dialog.

I expected it to perform the versioning across the two drives without hassle.

To reproduce..

  1. Create a synced folder on one drive (let's call it Drive A)
  2. Configure Syncthing on a Windows host to do Staggered File Versioning, with the Versions Path set to a different drive (let's call this one Drive B)
  3. Delete a file or folder from the synced folder on a different computer
  4. Syncthing on the Windows host will attempt to copy the files, but fail with "The system cannot move the file to a different disk drive."

Version Information

Syncthing Version: v0.14.54
OS Version: Windows 10 Pro for Workstations, build 1809
Browser Version: N/A

@calmh calmh changed the title Syncthing on Windows cannot do file versioning across drives File versioning across drives Jan 1, 2019

@calmh calmh added the enhancement label Jan 1, 2019

@calmh

This comment has been minimized.

Copy link
Member

commented Jan 1, 2019

This is known, but I didn't find an existing ticket for it. Versioning uses renames, which indeed don't work across drives. It's only "staggered" that allows a custom path, and it's not clear that that wasn't a mistake to begin with...

@AudriusButkevicius

This comment has been minimized.

Copy link
Member

commented Jan 1, 2019

I think we should disable custom versioning directories all together and force people to use symlinks. This is the only sensible way to maintain the filesystem abstraction.

@Ferroin

This comment has been minimized.

Copy link

commented Jan 2, 2019

I think we should disable custom versioning directories all together and force people to use symlinks.

While I'm all for simplifying things, this will lead to some pretty serious complications for Windows users who aren't power users unless Syncthing itself creates the symlinks. I'm also pretty sure it won't work reliably (if at all) on Android.

@calmh

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

@AudriusButkevicius

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

Sure, I am not disputing that we should support versioning across devices. I am however oppose to allowing people to specify arbitary paths. It should always be a symlink if they wish to point it to another device.

@Catfriend1

This comment has been minimized.

Copy link

commented Jan 3, 2019

I like the idea of symlinks very much, but yes, Android doesn't support symlinks unless one hacks and modifies a device a lot to use ext4 for external storage cards.

AudriusButkevicius added a commit to AudriusButkevicius/syncthing that referenced this issue Feb 6, 2019

lib/versioner: Restore for all versioners, cross-device support
Fixes syncthing#4631
Fixes syncthing#4586
Fixes syncthing#1634
Fixes syncthing#5338
Fixes syncthing#5419

This also:
1. Forces all versioners to use the same tagging, meaning that trash can versioner will start adding timestamps (cleanup is mtime based so it's ok)
2. Removes Rename function which seems not to be used anywhere important anymore, and TryRename is now RenameOrCopy
3. Versioning (and ton of other stuff) should now happen across filesystems when possible.
4. Adds versioning support for untagged and old file.txt~2014... tagged files. (There was no other way, in order to support trashcan versioner)

AudriusButkevicius added a commit that referenced this issue Apr 28, 2019

lib/versioner: Restore for all versioners, cross-device support (#5514)
* lib/versioner: Restore for all versioners, cross-device support

Fixes #4631
Fixes #4586
Fixes #1634
Fixes #5338
Fixes #5419

@calmh calmh added this to the v1.1.3 milestone Apr 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.