Skip to content

Instantly share code, notes, and snippets.

@codemicro
Created August 10, 2020 10:57
Show Gist options
  • Save codemicro/f9dc94ecf5831772e1bff92dfba337d0 to your computer and use it in GitHub Desktop.
Save codemicro/f9dc94ecf5831772e1bff92dfba337d0 to your computer and use it in GitHub Desktop.
Update a BookStack installation while also talking a backup
#!/bin/bash
cd bookstack
rm -rf backups
mkdir backups/
echo "Input MySQL user:"
read SQLUSER
mysqldump -u $SQLUSER -p bookstack > backups/database.sql
tar -czvf backups/files.tar.gz .env public/uploads storage/uploads
git pull origin release
composer install --no-dev
php artisan migrate
php artisan cache:clear
php artisan view:clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment