Skip to content

Instantly share code, notes, and snippets.

@dbalabka
Created July 16, 2015 08:51
Show Gist options
  • Save dbalabka/2b0a33ca52f4e78a4f90 to your computer and use it in GitHub Desktop.
Save dbalabka/2b0a33ca52f4e78a4f90 to your computer and use it in GitHub Desktop.
Ghost blog upgrade with full backup
#!/bin/sh
cd /var/www &&
service ghost stop &&
now=$(date +"%Y%m%d_%H%M%S") &&
tar -zcvf "ghost_${now}.tar.gz" ./ghost &&
wget http://ghost.org/zip/ghost-latest.zip -O ghost-latest.zip &&
rm -rf ghost/core &&
unzip -uo ghost-latest.zip -d ghost &&
chown -R ghost:ghost ghost/* &&
cd ghost &&
npm install --production &&
service ghost start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment