Created
July 16, 2015 08:51
-
-
Save dbalabka/2b0a33ca52f4e78a4f90 to your computer and use it in GitHub Desktop.
Ghost blog upgrade with full backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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