From 7fcaf68fbb4dd49b7a95251a563fb8ec99f633ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Mon, 25 Nov 2024 14:03:58 +0100 Subject: [PATCH] fix: update upgrade instructions to correct step numbering and improve clarity --- docs/upgrading.md | 76 +++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/docs/upgrading.md b/docs/upgrading.md index b2b279f6f..27ce70510 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -185,71 +185,71 @@ === "SQLite" - 1. **Stop the Stack.** - - ```bash - docker compose down - ``` - - 2. **Remove the existing database file.** + 1. **Remove the existing database file.** ```bash docker exec -u 0 -i rm -f /var/lib/bunkerweb/db.sqlite3 ``` - 3. **Restore the backup.** + 2. **Restore the backup.** ```bash docker exec -i sqlite3 /var/lib/bunkerweb/db.sqlite3 < /path/to/backup/directory/backup.sql ``` - 4. **Fix permissions.** + 3. **Fix permissions.** ```bash docker exec -u 0 -i chown root:nginx /var/lib/bunkerweb/db.sqlite3 docker exec -u 0 -i chmod 770 /var/lib/bunkerweb/db.sqlite3 ``` - === "MySQL/MariaDB" - - 5. **Stop the Stack.** + 4. **Stop the Stack.** ```bash docker compose down ``` - 6. **Restore the backup.** + === "MySQL/MariaDB" + + 1. **Restore the backup.** ```bash docker exec -e MYSQL_PWD= -i mysql -u < /path/to/backup/directory/backup.sql ``` - === "PostgreSQL" - - 7. **Stop the Stack.** + 2. **Stop the Stack.** ```bash docker compose down ``` - 8. **Remove the existing database.** + === "PostgreSQL" + + 1. **Remove the existing database.** ```bash docker exec -i dropdb -U --force ``` - 9. **Recreate the database.** + 2. **Recreate the database.** ```bash docker exec -i createdb -U ``` - 10. **Restore the backup.** + 3. **Restore the backup.** ```bash docker exec -i psql -U -d < /path/to/backup/directory/backup.sql ``` + 4. **Stop the Stack.** + + ```bash + docker compose down + ``` + 2. **Downgrade BunkerWeb**. ```yaml @@ -571,71 +571,71 @@ === "SQLite" - 1. **Stop the Stack.** - - ```bash - docker compose down - ``` - - 2. **Remove the existing database file.** + 1. **Remove the existing database file.** ```bash docker exec -u 0 -i rm -f /var/lib/bunkerweb/db.sqlite3 ``` - 3. **Restore the backup.** + 2. **Restore the backup.** ```bash docker exec -i sqlite3 /var/lib/bunkerweb/db.sqlite3 < /path/to/backup/directory/backup.sql ``` - 4. **Fix permissions.** + 3. **Fix permissions.** ```bash docker exec -u 0 -i chown root:nginx /var/lib/bunkerweb/db.sqlite3 docker exec -u 0 -i chmod 770 /var/lib/bunkerweb/db.sqlite3 ``` - === "MySQL/MariaDB" - - 5. **Stop the Stack.** + ''. **Stop the Stack.** ```bash docker compose down ``` - 6. **Restore the backup.** + === "MySQL/MariaDB" + + 1. **Restore the backup.** ```bash docker exec -e MYSQL_PWD= -i mysql -u < /path/to/backup/directory/backup.sql ``` - === "PostgreSQL" - - 7. **Stop the Stack.** + 2. **Stop the Stack.** ```bash docker compose down ``` - 8. **Remove the existing database.** + === "PostgreSQL" + + 1. **Remove the existing database.** ```bash docker exec -i dropdb -U --force ``` - 9. **Recreate the database.** + 2. **Recreate the database.** ```bash docker exec -i createdb -U ``` - 10. **Restore the backup.** + 3. **Restore the backup.** ```bash docker exec -i psql -U -d < /path/to/backup/directory/backup.sql ``` + 4. **Stop the Stack.** + + ```bash + docker compose down + ``` + 2. **Downgrade BunkerWeb**. ```yaml