Backup and Restore
Backup
Backing up Bookstack is pretty striaght forward. Simply backup the Bookstack database and the Bookstack /var/www folder, and you'll be good to go.
Official Documentation: https://www.bookstackapp.com/docs/admin/backup-restore/
Backup the Database
To backup the database, you can use the mysqldump command to dump the database into a file:
sudo mysqldump -u root bookstack > bookstack.backup.sql
Backup the /var/www/Bookstack folder
To backup the /var/www/Bookstack folder, you can tar the whole folder and copy the tar file to a different device:
sudo tar -czvf bookstack.tar.gz /var/www/BookStack
Restore to New Installation
To restore from the above backups to a new installation, follow the manual installation steps to the end, but do not run the php artisan migrate command yet.
Once you have a fresh installation ready, restore the database and copy over the /var/www/Bookstack folders.
Restore database
sudo mysql -u root bookstack < bookstack.backup.sql
Restore the /var/www/Bookstack folder
sudo tar -xvzf bookstack.tar.gz --directory /var/www/
Run the php artisan migrate command
Chnage into the Bookstack folder, then run the command:
php artisan migrate