Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Install updated version of script such that running instances cannot use an inconsistent state

by Corion (Pope)
on Jan 28, 2013 at 21:03 UTC ( #1015760=note: print w/ replies, xml ) Need Help??


in reply to Install updated version of script such that running instances cannot use an inconsistent state

My approach is to have the following directory layout:

/corion/App-0.01/ /corion/App-0.02/ /corion/App-0.03/ /corion/App/ -> /corion/App-0.03 # a symlink

Then, when I'm staging App v0.04, I will copy all the files from 0.03 (plus the changes that make 0.04 0.04), stop the server for App v0.03, copy its database (most often, SQLite) to 0.04, and then move the symlink to point to 0.04 and start the (0.04) server again.

That way, I can easily fall back to using 0.03, should my testing have gone wrong or the database migration have gone wrong in some way. I also have now written me a shell script that shows me a diff between the new version directory and the current symlink before it copies the database, so I can do a final review of what changes go live.


Comment on Re: Install updated version of script such that running instances cannot use an inconsistent state
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015760]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2014-08-21 04:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls