2

So, basically, I'm looking for linux software to monitor a folder (and it's subfolders) for any changes and apply some form of versioning (that is, keep a "database", or whatever, from where I can restore files).

The reason why this can't be done with traditional SCMs (GIT, SVN, HG, whatever) is twofold:

  • the monitoring and versioning must be automatic (with the only order criteria being time)
  • the software I need is to do a specific thing, unlike SCM, where they do a lot more (and of course reasonably more error-prone)

The server this will be run on is an unmanaged VPS, hence having considerable control - but I'm afraid not enough to install a versioning filesystem partition.

While at it, know that I checked out wayback already, but I'm not impressed and hesitant to use software last updated 7 years ago (2004).

Sorry for passing on the headache to other fellow server-faulters, but I can't help it ;)

Edit: By the way, though I would prefer this to be CLI-based, any alternatives are very welcome as well!

Edit 2: Not to bash linux or anything, but with linux(unix)'s concept of signals, this shouldn't be too difficult to write (by a dedicated team of course).

In fact, I'm using a system which does this already (Dropbox), but it has a different purpose and as such, versioning is limited to 30 days (and versioning is kept in an online storage). But it shows that the concept is entirely possible.

HopelessN00b
  • 54,273
Christian
  • 485
  • 6
  • 24

3 Answers3

1

Does it really have version on change at the file level, or would you accept a periodic snapshots?

If you are willing to accept periodic snapshots then you could simply use something like dirvish or rsync directly. Basically you build a complete copy of your filesystem, and then any further copies will hardlink identical files, and new/changed files will be separate.

Dirvish basically is a front end for rsync and uses the --link-dest option.

How are the users accessing the filesystem? Is access via webdav an option? You could setup SVN with apache, and use the autoversioning.

Zoredache
  • 133,737
1

If you don't want to use rsync as Zoredache suggested, my next suggestion would be to write a script which uses inotify to monitor for changes. It wouldn't be very difficult.

Then whether your script then automatically commits the changed file to a traditional version control system (like svn, git, etc) or just keeps the last X versions of the file else where is up to you.

Steven
  • 3,109
0

I know of one method of doing this. It's a proprietary file-system and comes with a bunch of other stuff which in turn makes it very expensive, but it does do most of what you're looking for. It's called NSS and ships with Novell's Open Enterprise Server 2. Unlike Wayback, it's actually still supported. It keeps what it calls a 'salvage' tree, which will keep as much 'deleted' data as there is free space on the volume minus 20% (this can be configured).

The one caveat is that it doesn't track revisions to specific files, only files that are deleted and recreated with new information. So, Excel files will be tracked, but Access databases won't be.

NSS Salvage will track only a certain period of time that depends on how much free space is left on the volume. Pair that with an automated system to pull files out of Salvage and into a more traditional revision-control system and you have a pretty powerful solution. It does mean dealing with Novell, though.

sysadmin1138
  • 135,853