Deploys That Roll Themselves Back, and Restore the Database Only When the Schema Changed
CaRMen, my CRM, runs on a single VPS as two instances: the real one and a public demo. In October, I gave it a deploy script that can undo itself when a new version doesn't come up, including, when it has to, the database. The database is the interesting part.