Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to automatically backup of files and folders triggered by a file or folder replace action.

I'm looking for somthing like git-hooks or a listener of some sort that can run a version-control-like process automatically when a file or folder has been replaced.

I'm looking specifically for a hook that can trigger a script the rest is fairly straigt forward to me in terms of scripting the comparison and backup process.

The scenario is this: the art department at an add agency is delivering files to the flash developers and they are having some verisoning conflicts.

The fash developers use version control but hte art departmen does not.

The goal is to impliment a version control like environment that checks in files and tracks changes automatically when files are uploaded to the share server from the gui.

This is all taking place on the MAC operating system.

looks like I found the answer:
the FSEvents API appears to fire events associated with the file system documentation for FSEvents API

Python wrapper library for FSEvents API article

share|improve this question
up vote 1 down vote accepted

On Linux you can use inotify - look at for inotify-tools that provide a shell utility to monitor file changes.

That page also lists various other APIs for using inotify. Specifically, i would look at incron which is a cron like service that triggers commands based on file system changes. There is also a Python API as well as for other languages.

share|improve this answer
awsome thanks guss – Fire Crow Jul 25 '09 at 23:53

Your Answer


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.