This is a simple BookStack backup script, to dump the database, copy uploaded files, and zip it all up into a timestamped archive. This is designed for an on-system install, not a docker setup. Database credentails are automatically read from your BookStack config.
This script will copy uploads before zipping, so you'll need more free space on your system than your BookStack directory already consumes.
- Copy the script down to a file (
bookstack-backup.sh
). - Tweak the configu variables at the top of the script.
- Make the script executable (
chmod +x bookstack-backup.sh
). - Run the script (
./bookstack-backup.sh
).
Thanks Man-in-Black for that. At the moment I just use a bash script to automatically delete the zip file first, then run the docker backup script to create a new bookstack.zip, so that the hyperbackup program on my synology can pick up the bookstack backup files.
Your script is a much better and more elegant way of doing this file rotation. I will try to adapt to my system.
Thanks again for that. This is much appreciated.