Skip to content

Instantly share code, notes, and snippets.

@Macrofig
Last active February 22, 2016 06:24
Show Gist options
  • Select an option

  • Save Macrofig/d7c6bd700339c29c4045 to your computer and use it in GitHub Desktop.

Select an option

Save Macrofig/d7c6bd700339c29c4045 to your computer and use it in GitHub Desktop.
Script to backup and upgrade a Ghost install
# http://support.ghost.org/how-to-upgrade
# TODO
# ghost download root path
# ghost version
# webroot path
# download path
# backup path
# Make a backup
# Stop Forever
cd ~
wget -O=latestghost.zip http://ghost.com/latest
unzip latestghost.zip -d ~/ghostupdate
rm ~/ghost/index.js
rm ~/ghost/package.json
cp ~/ghostupdate/index.js ~/ghost/index.js
cp ~/ghostupdate/package.js ~/ghost/package.js
rm -rf core
cp -ar ~/ghostupdate/core ~/ghost/core
npm install --production
# Do some install checks
# Restart forever
# Check if Forever started properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment