bunkerity / bunkerity/bunkerweb

[BUG] Upgrade to 1.6.14 backup failed "Error while executing bwcli"

Open
#3,836 4 comments 0 reactions 1 assignee Claimed by @TheophileDiot View on GitHub
bug linux next minor
Dominant language
Python
Stars
11k
Forks
642
Avg merge
1d 10h
Merged PRs (30d)
42

Description

### What happened?

When doing the Upgrade described here (https://docs.bunkerweb.io/latest/upgrading/#procedure) from `1.6.13 -> 1.6.14` the updater was not able to create a backup but still did go on with the upgrade. Afterwards I needed to restart the server a few times in order to again have access to sites served and control panel.

### How to reproduce?

```
LATEST_VERSION=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')

# Download the script and its checksum
curl -fsSL -O https://github.com/bunkerity/bunkerweb/releases/download/${LATEST_VERSION}/install-bunkerweb.sh
curl -fsSL -O https://github.com/bunkerity/bunkerweb/releases/download/${LATEST_VERSION}/install-bunkerweb.sh.sha256

# Verify the checksum
sha256sum -c install-bunkerweb.sh.sha256

# If the check is successful, run the script
chmod +x install-bunkerweb.sh
sudo ./install-bunkerweb.sh

=========================================
BunkerWeb Easy Install Script
=========================================

[INFO] Detected OS: Ubuntu 24.04
[INFO] Fetching gum 0.17.0 (Linux_x86_64) from GitHub releases...
[INFO] Existing Linux installation detected โ€” keeping the Linux deployment.
[INFO] Detected existing BunkerWeb installation (version 1.6.13)
[INFO] Detected install type: Full Stack (bunkerweb + scheduler + ui)
[WARNING] Requested version 1.6.14 differs from installed version 1.6.13. Upgrade will be attempted.
โ–ธ Upgrade BunkerWeb: [Yes]
[INFO] Applying detected install type: Full Stack (bunkerweb + scheduler + ui)

โ–ธ ๐Ÿ’พ Pre-upgrade Backup
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ A pre-upgrade backup is recommended to preserve โ”‚
โ”‚ configuration and database state. The backup runs before any โ”‚
โ”‚ package upgrade and is stored under the path you choose below. โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โ–ธ Pre-upgrade Backup: [Yes]
โ–ธ Pre-upgrade Backup: [/var/tmp/bunkerweb-backup-20260824-162033]

```

### Configuration file(s) (yaml or .env)

```YAML

```

### Relevant log output

```shell
[INFO] Upgrade mode: 1.6.13 -> 1.6.14
[STEP] Creating pre-upgrade backup in /var/tmp/bunkerweb-backup-20260824-162033
[2026-08-24 16:20:36 +0200] [CLI] [2522655] [โ„น๏ธ ] - Getting variables from database
[2026-08-24 16:20:36 +0200] [CLI] [2522655] [โ„น๏ธ ] - โœ… Database connection established
[2026-08-24 16:20:36 +0200] [CLI] [2522655] [โŒ] - Error while executing bwcli :
Traceback (most recent call last):
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/base.py", line 1969, in _exec_single_context
self.dialect.do_execute(
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: bw_settings

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/share/bunkerweb/cli/main.py", line 76, in
cli = CLI()
^^^^^
File "/usr/share/bunkerweb/cli/CLI.py", line 105, in __init__
self.__variables = self.__db.get_config()
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/bunkerweb/db/Database.py", line 105, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/bunkerweb/db/Database.py", line 2816, in get_config
for setting in query:
File "/usr/share/bunkerweb/deps/python/sqlalchemy/orm/query.py", line 2850, in __iter__
result = self._iter()
^^^^^^^^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/orm/query.py", line 2864, in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/orm/session.py", line 2373, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/orm/session.py", line 2271, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/orm/context.py", line 306, in orm_execute_statement
result = conn.execute(
^^^^^^^^^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/base.py", line 1421, in execute
return meth(
^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/sql/elements.py", line 526, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/base.py", line 1643, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/base.py", line 1848, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/base.py", line 1988, in _exec_single_context
self._handle_dbapi_exception(
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/base.py", line 2365, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/base.py", line 1969, in _exec_single_context
self.dialect.do_execute(
File "/usr/share/bunkerweb/deps/python/sqlalchemy/engine/default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: bw_settings
[SQL: SELECT bw_settings.id AS bw_settings_id, bw_settings.context AS bw_settings_context, bw_settings."default" AS bw_settings_default, bw_settings.multiple AS bw_settings_multiple
FROM bw_settings ORDER BY bw_settings."order"]
(Background on this error at: https://sqlalche.me/e/20/e3q8)

[WARNING] Automatic backup failed. Verify manually before continuing.
[INFO] Removing holds (bunkerweb, nginx)
[STEP] Stopping services prior to upgrade
[CMD] systemctl stop bunkerweb
[CMD] systemctl stop bunkerweb-ui
[CMD] systemctl stop bunkerweb-scheduler
[STEP] Upgrading BunkerWeb package
```

### BunkerWeb version

1.6.14

### What integration are you using?

Linux

### Linux distribution (if applicable)

Ubuntu 24.04.4 LTS

### Removed private data

- [x] I have removed all private data from the configuration file and the logs

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.