Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] fileserver with file versioning support
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1073

PostPosted: Fri Oct 11, 2019 11:01 pm    Post subject: [solved] fileserver with file versioning support Reply with quote

I'd like to build a fileserver that will serve windows (samba?) and linux (nfs or sshfs) clients. It would be nice to have the ability to restore all versions of file modifications available to be able to rollback. What would be the tools to have a look at to achieve this? Are there well-established solutions that can store modifications when a file is altered, or does this have to be accomplished by some sort combination of synchronization / snapshot / backup tools ?

Although I don't like the redmonter M$ I must admit, that it seems quite convenient to have a file or folder rightclicked and than to simply chose previous versions on them, so I'd like to establish something similar for my future fileserver.

What would you recommend me ? I am looking forward to your suggestions and am ready to dive in an read and learn :)


Last edited by Elleni on Sun Oct 13, 2019 6:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6486

PostPosted: Fri Oct 11, 2019 11:19 pm    Post subject: Reply with quote

I believe that's something Samba already supports, Windows calls it “shadow copies” and there's plugins to expose native filesystem snapshots through that. It doesn't look easy to use IMO, but seems to be more or less fully supported: https://www.samba.org/samba/docs/current/man-html/vfs_shadow_copy2.8.html

If you want more fine-grained file versioning than that, a WebDAV server might be a better idea. I haven't looked at it in a long time but Windows clients used to have built-in support for it.
Back to top
View user's profile Send private message
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1073

PostPosted: Fri Oct 11, 2019 11:53 pm    Post subject: Reply with quote

Thanks Ant P. I will have a look at them - webdav is a good idea as I plan to setup a nextcloud server anyway and I realize that way version control is within. :) Also nice to know that samba is capable serving volume shadow service to its clients.

As we want to use windows only where absolutely needed, it would be nice to have established similar functionality on the linux desktops, and if I am not mistaken, the big ones (gnome, kde) should support this too somehow, as there are options to rightclick a file and/or folder then chose restore/revert to previous version, I just have to find out, what their prerequisites are :twisted:

On the fileserver itself, I guess, I will have to establish some sort of synchronisation and backup mechanisms too, as I understand, that above functionality is convenient for the user, but it sure as hell is not a backup :D
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1876

PostPosted: Sat Oct 12, 2019 11:49 am    Post subject: Reply with quote

Not exactly "every version of a file", but you could get pretty close to that with snapshots. These tend to be pretty lightweight, require little to no setup, and quick to create.
Some options:
CephFS - does fine in SOHO scenarios, but seems not to scale too well (yet). You can snapshot the pool every few minutes.
ZFS - don't know much about it, but it does support fs-level (or zpool-level) snapshots
NILFS - you must not allow the FS to completely fill up for there is no way to recover from that. Possibly a snapshot with a deleted file would mitigate that, since you can convert it back to a regular checkpoint and garbage collect it (haven't tested this workaround). Writes are atomic though, so it's immune to damage caused by power outages by design rather than by luck.

Finally... Anytthing on top of snapshoting block device. Like good, old, boring ext on top of LVM or RBD.
Note that having LVM snapshots active at all times you basically must use thin snapshots, and if the thin pool runs out of space, it explodes and you lose all data within that pool. And snapshotting at block level, you will have a lot of old FS journals, which you don't really need, wasting space that could be used for more actual data. Not sure if the wasted amount it big enough to be an issue though
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2127
Location: Frankfurt, Germany

PostPosted: Sat Oct 12, 2019 12:11 pm    Post subject: Reply with quote

Quote:
It would be nice to have the ability to restore all versions of file modifications available to be able to rollback.

I have a similar requirement, but mostly for text files. I use a Subversion server. It works perfectly fine. Users can compare versions and roll back to any previous version.
Back to top
View user's profile Send private message
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1073

PostPosted: Sun Oct 13, 2019 6:06 pm    Post subject: Reply with quote

Thanks for your informations guys. I guess, I'll edit the post as [solved]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum