From 14ca09f7f463ff34998bc2edce611f39a8249f69 Mon Sep 17 00:00:00 2001 From: DoTheEvo Date: Sun, 12 Feb 2023 09:11:41 +0100 Subject: [PATCH] update --- bookstack/readme.md | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/bookstack/readme.md b/bookstack/readme.md index 63f5fa2..fe25fcc 100644 --- a/bookstack/readme.md +++ b/bookstack/readme.md @@ -27,21 +27,20 @@ which uses nginx as a web server. └── ~/ └── docker/ └── bookstack/ - ├── bookstack_data/ - ├── bookstack_db_data/ - ├── .env - ├── docker-compose.yml - └── bookstack-backup-script.sh + ├── 🗁 bookstack_data/ + ├── 🗁 bookstack_db_data/ + ├── 🗋 .env + ├── 🗋 docker-compose.yml + └── 🗋 bookstack-backup-script.sh ``` -* `bookstack_data/` - a directory with bookstacks web app data -* `bookstack_db_data/` - a directory with database data +* `bookstack_data/` - bookstacks web app data +* `bookstack_db_data/` - database data * `.env` - a file containing environment variables for docker compose * `docker-compose.yml` - a docker compose file, telling docker how to run the containers -* `bookstack-backup-script.sh` - a backup script if you want it +* `bookstack-backup-script.sh` - a backup script, to be run daily -You only need to provide the files.
-The directories are created on the first run. +You only need to provide the files. The directories are created on the first run. # docker-compose @@ -111,7 +110,7 @@ MAIL_HOST=smtp-relay.sendinblue.com MAIL_PORT=587 MAIL_FROM=book@example.com MAIL_USERNAME= -SMTP_PASSWORD= +MAIL_PASSWORD= ``` **All containers must be on the same network**.
@@ -143,7 +142,13 @@ Default login: `admin@admin.com` // `password` * It did not start.
Ctrl+f in `.env` file for word `example` to be replaced with actual domain name. `APP_URL` has to be set correctly for bookstack to work. -* If after update you cant see edit tools. Clear cookies. +* After update cant see edit tools.
+ Clear browsers cookies/cache. +* The test email button in preferences throws error.
+ Exec in to the container and `printenv` to see. + Check [mail.php](https://github.com/BookStackApp/BookStack/blob/development/app/Config/mail.php) + to see exact `MAIL_` env variables names and default values. + Test in thunderbird your smtp server working or not. # Update @@ -181,12 +186,12 @@ Users data daily export using the For bookstack it means database dump and backing up several directories containing user uploaded files. -Daily kopia or borg backup run takes care of backing up the directories. -So only database dump is needed.
-The created backup sqlite3 file is overwritten on every run of the script, +Daily kopia/borg backup run takes care of backing up the directories. +So only database dump is needed and done with the script.
+The created backup sql file is overwritten on every run of the script, but that's ok since kopia/borg are keeping daily snapshots. -#### Create a backup script +#### Backup script Placed inside `bookstack` directory on the host @@ -200,9 +205,9 @@ docker container exec bookstack-db bash -c 'mysqldump -u $MYSQL_USER -p$MYSQL_PA the script must be **executable** - `chmod +x bookstack-backup-script.sh` -#### Cronjob +#### Cronjob - scheduled backup -Running on the host, so that the script will be periodically run. +Running on the host * `su` - switch to root * `crontab -e` - add new cron job
@@ -212,7 +217,9 @@ Running on the host, so that the script will be periodically run. # Restore the user data -Assuming clean start, first restore the database before running the app container. +Assuming clean start and latest images.
+Will need `BACKUP.bookstack.database.sql` and content of `bookstack_data/www/`
+Note that database restore must happen before bookstack app is first run. * start only the database container: `docker-compose up -d bookstack-db` * copy `BACKUP.bookstack.database.sql` in `bookstack/bookstack_db_data/`