diff --git a/docs/administration.md b/docs/administration.md index 9b6bed961..8e27df982 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -151,6 +151,23 @@ the background. ### Bare Metal Route {#bare-metal-updating} +!!! warning + + Extracting a new release archive on top of an existing installation + (e.g. `tar -xf paperless-ngx-vX.Y.Z.tar.xz -C /opt/paperless`) only adds + and overwrites files -- it does not remove files that were deleted in + the new release. Leftover files from an old version, such as + superseded database migrations, can remain on disk and cause errors + like `NodeNotFoundError` during `manage.py migrate`. + + Before unpacking a new release over an existing bare-metal + installation, remove the previous source tree first (everything + except your `media`, `data`, and `consume` directories and your + `paperless.conf`/`.env`), or unpack into a fresh directory and move + your persistent data and configuration over. Installations updated via + `git pull` on a clean checkout are not affected, since Git removes + files that no longer exist upstream. + After grabbing the new release and unpacking the contents, do the following: diff --git a/docs/setup.md b/docs/setup.md index 233a2a54e..821200140 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -262,6 +262,14 @@ to a positive number to enable polling and disable native filesystem notificatio and copy the contents to the home directory of the user you created earlier (`/opt/paperless`). + !!! note + + If you are updating an existing bare-metal installation rather than + installing for the first time, see the + [bare metal update instructions](administration.md#bare-metal-updating) + instead -- extracting a new release on top of an old one can leave + behind stale files from the previous version. + Optional: If you cloned the Git repository, you will need to compile the frontend yourself. See [here](development.md#front-end-development) and use the `build` step, not `serve`.