Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Auto rsync local changes to remote server (senko.net)
45 points by senko on Aug 19, 2011 | hide | past | favorite | 10 comments


Why not just use Lsync (http://code.google.com/p/lsyncd/) for this? You configure the directories to be synced and it handles all the rest.


I didn't know about lsyncd, thanks for sharing!


That looks fantastic. Thanks for sharing.


If you're already multiplexing ssh connections then you might want to use sshfs/fuse to mount the remote directory over ssh and edit files as if they were remote.

Similarly, if you use vim you can edit the remote file directly:

    vim scp://hostname/filename


This probably isn't the best place for this question, but its somewhat related. We currently have a dev and prod environment that I can't install applications (like git) but i want to setup a better deployment process aside from just copying files. For various reasons development needs to be done on the dev server. I have tried using sshfs with git to commit changes in dev and deploy them to prod but it seems too slow. My next task was going to use something like fabric to script the process, but I am unsure if that is the best tool for the job.

My thinking was that a script would sync changes on the dev server to a intermediate staging server and commit the changes. For deployment to prod i'd like to copy just the files that changed up to production. Should I just write a shell script or are there better tools for the job?


Fabric is a good choice for that. I'm worried that you don't seem to have any kind of release process in place. I hope you at least tag the code you are releasing.


Another alternative would be to mount the remote filesystem using SSHFS.


Problem with remote filesystems is that the local editor usually expects the operation to be fast and does the save synchronously.

So, if I save the file in editor, it takes a second or so to get it synced. I'm the type of person that hits save very often, sometimes unconsciously, so I wouldn't want the editor to freeze for a moment every time I do it.


Or to use a virtual development environment with the help of Vagrant http://vagrantup.com


See also: doubledown by devstructure https://github.com/devstructure/doubledown




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: