You are not logged in.
Pages: 1
I'm working in one location and use rsync to send my code to a development server here at work. Currently I make my changes and run rsync manually with something like:
rsync -zrptLv --delete-after -e "ssh" --exclude=.svn /home/code/ devserver:/code/
And that works great, except it's annoying to always have to run that line whenever I change a file. Does anyone know a way to monitor a directory (recursively) for file changes and run rsync when it happens?
Offline
something like this maybe pyinotify...
Offline
Either sshfs, or some inotify daemon will do - such as incron (http://inotify.aiken.cz)
Offline
or git ?
Offline
or git ?
+1, sort of. I'm not familiar with git, but with svn he would still have to run at least a svn commit after a change. Version control just makes sense though.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Gah, incron looked so promising until I fiddled with it for an hour only to discover it doesn't scan subdirectories recursively. That's a show-stopper .
Offline
Gah, incron looked so promising until I fiddled with it for an hour only to discover it doesn't scan subdirectories recursively. That's a show-stopper .
Oops...Indeed incron can't monitor a whole directory tree. You could try fsniper (http://projects.l3ib.org/trac/fsniper); claimed to be able to do that.
Offline
You can use dropbox, it while sync a two pc's. I use it for my work on the university, there i work on a laptop but at home i rather work on my Desktop. So i use dropbox , it's a 2 gb webspace and it also handles subdirectories. There's a wiki about it.;)
Offline
I can't do dropbox. Our firewall restrictions would prevent that.
Offline
install inotify-tools from the AUR.
Create a script:
#!/bin/sh
while inotifywait -e modify -e create -e delete /home/code/; do
rsync -zrptLv --delete-after -e "ssh" --exclude=.svn /home/code/ devserver:/code/
done
Run it!
Offline
fnsiper works for subdirs and it's damn easy to use. Thanks jcolinzheng. I've also been searching something like this and I always used icrond, which has some strange issues when running commands.
Last edited by bluewind (2009-01-14 13:10:32)
Offline
" If it aint broke... Then you're not trying hard enough! "
Offline
Pages: 1