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.

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

developer.apple.com documentation for FSEvents API

Python wrapper library for FSEvents API

mac-forums.com article

share|improve this question

1 Answer 1

up vote 1 down vote accepted

On Linux you can use inotify - look at http://inotify-tools.sourceforge.net/ 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

 
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.