Skip Navigation

Upgrading Paperless-ngx several revisions behind

Hey everyone. For a variety of reasons I’ve ended up with a paperless-ngx install that has not been upgraded for a while. It’s currently on 1.17.1, and I’ve been researching to figure out the best way to get back up to current. I’m worried about major changes that have happened over time and what the best way to go about this is, but I’ve not had good luck finding something that gives me the confidence to go about it. Hoping someone here has some guidance. Cheers!

10 comments
  • This is how I handle it for most software: Read (or at least skim) the changelogs for all minor and major versions between your current version and the latest version.

    If you're using Docker, diff your current docker-compose to the latest one for the project. See if any third-party dependencies (like PostgreSQL, Redis, etc) have breaking changes.

    If there's any versions with major breaking changes, upgrade to each one separately (eg. 1.0 to 2.0, then 2.0 to 3.0, etc) rather than jumping immediately to the latest one, as a lot of developers don't sufficiently test upgrading across multiple versions.

    Take a snapshot before each upgrade (or if your file system doesn't support snapshots, manually take a backup before each upgrade).

    ...or just don't read anything, YOLO it, and restore a snapshot if that fails. A lot of software is simple enough that all you need to do is change the version number in docker-compose (if you're using Docker).

  • Paperless provides an export tool that lets you export all your documents. There's no guarantee that the import will work on a higher version, but usually it's fine. Just make sure that you have a clean install without any documents before importing from an old export.

    It's also possible to export all documents and metadata via the REST API, though that's a bit fiddly. Then you can import them the same way. Again, this should only be done into an empty system, because otherwise your object IDs will be all scrambled up.

10 comments