[Klug-general] rsync woes, or, version control for web-developers?

MacGyveR macgyver at thedumbterminal.co.uk
Mon Nov 14 20:53:05 UTC 2011


On Monday 14 November 2011 05:21:30 James Morris wrote:
> On 13 November 2011 21:39, Mike Evans <mike at tandem.f9.co.uk> wrote:
> > Yes - I looked at the link - but when you wrote "if I edit files on the
> > server" I thought you were meaning editing the live files.
> 
> That is what I meant.
> 
> > The bogeyman only strikes if you edit files which are accessed by the
> > live webserver.  I see that the article assumes you might do that - in
> > any organisation I've worked in the post-commit script would email the
> > bogeyman directly.  Quite often the bogeyman was me :)
> 
> Ah hadn't realized you meant a flesh and bone bogeyman. That would be
> myself then.
> 
> I'm wondering though if git is not overkill. I don't really need a
> long history of versions, but having some history will certainly prove
> useful. And the history might eventually need pruning due to space
> limits.
> 
> I've only looked at the immediate surface of what rsync can do. I
> could write scripts so I didn't have to remember the exact rsync
> commands for up/down transfers. The only problem is accidentally doing
> the wrong thing is quite painful as I've found out. Maybe the script
> could rsync to a backup before rsync overwrote anything? Hmm.
> 
> James.
> 
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent

Version control and a good backup strategy are different things. You could 
Create your server's environment on your local workstation (maybe in a vm) 
then work on that, once you are happy with the changes, use rsync or whatever 
to upload the files to the live site, preferably in a script so its a simple 
one line command. If you create unit and/or acceptance tests that are run on 
deployment or check in to version control, then you can be sure that your code 
works (to the best of your knowledge) before going live, reducing red face 
moments.



More information about the Kent mailing list