Did syncthing has file versionning function?

keep like 30days history file copy?

Nope. I’d suggest a good filesystem that provides snapshots. ZFS and probably NTFS with it’s shadow copy thingy comes to mind. Btrfs if that floats your boat.

BitTorrent Sync does make a very simple “versioning”: They put old file into .SyncArchive/ and add a number to the filename.

That’s IMHO easy to implement and usefull than no backup.

Speaking even as a filesystem developer, several-time sync system-writing nerd, etc., saving versions is still among the most useful and powerful features of Dropbox in regular use for me.

  1. Filesystem-level versioning is only available in a few places (notably not Macs, nor any standard Linux distributions’ official filesystems).

  2. Full-filesystem snapshots are great in that they are globally atomic, but closely related to this they’re also generally taken much less often than ~every time a file is updated, which is the standard behavior in Dropbox and a natural fit for a file-level sync engine.

  3. Most of the time it’s more useful for versions to be associated with a share (globally) than with a single local instance. Again, in line with making this a feature of the sync system, and at odds with punting it to the client filesystems.

  4. Filesystem-level snapshots are generally not exposed in a user-friendly fashion. Old versions in a sync system are often exposed as plain files with older dates, easy for any user to browse and understand when restoring or comparing.

Please seriously consider it, at least if contributed as a patch by an outside developer.

It was a long time since I looked at btsync last time, but at that time at least ~/.SyncArchive was a non-optional thing that would eventually fill your disk. This, I won’t do, and hopefully it has changed in btsync since then.

However, I’m not opposed to versioning files per se. I could imagine that every time we overwrite the file A, we move the old version to A.$date or .Archived/A.$versionnumber or whatever and make sure to only keep a certain number of old files. It’s not at the top of my to do list (because I’m one of those crazy people who do frequent FS snapshots), but I might implement it.

Even better, if someone else implemented it (and it’s possible to turn off :slight_smile: I would absolutely accept the patch.

Yes IMHO that’s a problem…

Maybe move into .Archived/$Year$Month/A.$versionnumer would be a simple solution. Then it is possible to delete very old files and keep newer one…

Cleanup btsync ~/.SyncArchive is more complicated.

btw. is there a issues for this?

Versioning really is an important feature - I know several users of Bittorrent, incl sysadmins and IT folks in companies and government agencies who’d love to move on to syncthing but would need versioning. For my own, more humble use I’d also love syncthing to provide versioning, that would make it a true BT Sync and dropbox replacement imho. To address the ballooning diskspace usage that comes with endless versioning, I propose to adopt a phased versioning approach like e.g. OwnCloud has:

"The versioning app expires old versions automatically to make sure that the user doesn’t run out of space. Following pattern is used to delete old versions:

  • For the first 10 seconds ownCloud keeps one version every 2 seconds
  • For the first minute ownCloud keeps one version every 10 seconds
  • For the first hour ownCloud keeps one version every minute
  • For the first 24 hours ownCloud keeps one version every hour
  • For the first 30 days ownCloud keeps one version every day
  • After the first 30 days ownCloud keeps one version every week

The versions are adjusted along this pattern every time a new version gets created. Beside that the version app takes care to never use more that 50% of the users currently available free space. If the stored versions exceed this limit ownCloud delete the oldest versions until it meets the memory usage limit again."

This could of course be adjusted, maybe there could be two preconfiguerd versioning profiles, one of them focussing on providing many versions, as above, the other focussing on a minimum of versions and a maximum of free space. As Syncthing has block level sync, maybe this could be utilised to create deltas or at least “Back in Time” style folder hardlinks to ensure that versioning is possible with minimal space usage.

Regarding owncloud let me say that I hope Syncthing will get integrated to the point that I can use it instead of their native sync-client. Syncthing as sync and versioning backend and owncloud as a web frontend for file level sharing, collaboration, streaming etc - that would be the perfect combination, at least for the instances I run…

I hope its ok to add my vote for versioning without being able to offer patches, as I’m not a developer. Thank you for your work and your transparent, communicative and inclusive style of moving the project forward!

1 Like

I just added a condensed version of my suggestion above as an issue: https://github.com/calmh/syncthing/issues/218

I agree with many here. This is an amazing project and I would like to migrate to syncthing completely, but am reluctant because there is no version history. Even a very simple implementation would be a great addition.