Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm a little lost as to where to look regarding this, which is why I'm asking, there might be something obvious out there and I'm simply not hitting the right google keywords.

Here's what I'm trying to go for: I have multiple users accessing and modifying files in a directory (and it's sub directories) via a webapp. It can go from editing to uploading over them etc... In case anyone makes a mistake I would like to implement some version control where users could eventually roll back changes if need be (a bit along the lines of Versions on mac)

We're talking videos, images mostly but also zip, pdf, text, word, etc. On an Ubuntu Server 12.04

I would like to find my best options short of having to develop the functionality within the webapp (this would be an absolute last resort). I am aware I'll have to add some functionality to the app to bridge with which ever tool I may find, and that's fine.

If I were willing to sacrifice the space required I could probably use rdiff-backup but given we're talking terabites in some cases I'm not so inclined to use this option (though it still is a possibility)

Are there any filesystem version control tools that are production ready? Can they be limited to a single dir? Is there a tool that can monitor changes within a dir and write them as a diff in a transparent maner? ie: modifying a file doesn't modify the file but generates a diff, all this transparently so that it's as if the file were modified.. Etc.

Thanks in advance for your insight. Are there any tools out there

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The best option in this case would be snapshots as offered by ZFS or btrfs. However, there is no solid port of ZFS to Linux available (yet) and btrfs isn't stable enough for production use (IMHO).

share|improve this answer
    
ZFSonLinux is fairly stable, all things considered, and BTRFS is as well. Both of them are semi-production ready. I personally use ZFSonLinux in a production environment right now, but like you, I had to balance the gains of the feature set against the risks of a not bulletproof filesystem. –  Scrivener Mar 16 '13 at 22:30
    
Thanks for the info. this is going to be a bit of a headache with the NAS currently in place.. I guess I will have to give it a closer look. –  D.Mill Mar 16 '13 at 23:04

Another choice would be to setup a subversion (SVN) repository and look into using FSVS (http://fsvs.tigris.org/). I use it to version control all of our Linux servers, although we tell it to ignore a lot of directories that really are not useful to version control (such as /tmp, /proc, /sys, /var/run, etc.).

As an example, we use it to monitor our FTP uploads directory and push any changes into SVN on a regular basis.

#!/bin/sh
# Only executes FSVS if FSVS reports outstanding changes

FSVS_CONF=~/.fsvs-conf
FSVS_WAA=~/.fsvs-waa
export FSVS_CONF FSVS_WAA

cd /var/ftp

FCOUNT=`/usr/local/bin/fsvs | grep -v 'dir.*\.$' | wc -l`

if [ $FCOUNT -gt 0 ] ; then
    /usr/local/bin/fsvs ci -m "Automatic FSVS snapshot"
else
    echo "Nothing changed"
fi
share|improve this answer
    
thanks. I've gone with something similar. I'm testing using incron to trigger bzr versioning for the moment. I'm afraid this will be just as heavy in disk space as an rdiffbackup though since very few files are text based. –  D.Mill Jun 2 '13 at 17:43
    
Subversion (svn) repositories are fine, even with files up to say 1GB. But putting big items in SVN is best only done if you need to keep them forever and ever, otherwise you may need to look at volume shadow copies in Samba. Similar to how it works on a Windows file server; you snapshot the share volume once or twice per day and users can easily recover files from the previous snapshot. –  tgharold Jun 2 '13 at 20:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.