this post was submitted on 26 Jul 2025
26 points (100.0% liked)

Selfhosted

49847 readers
804 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

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!

top 11 comments
sorted by: hot top controversial new old
[–] Diplomjodler3@lemmy.world 2 points 8 hours ago

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.

[–] hendrik@palaver.p3x.de 2 points 9 hours ago

In these cases I'll do the same thing other people here seem to do as well. Do a backup (or snapshot) and then I'll try to just do it. Obviously read the documentation on updates and major version upgrades first. I think that's fine in the case of paperless-ngx.

Either it works or it doesn't. In that case I'll gather error logs and information for debugging and roll back to the backup. After a successful major upgrade, I often go through the settings and config and check about all the things that have been added or changed in the meantime and make sure they're set to my liking.

[–] dan@upvote.au 11 points 16 hours ago

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).

[–] InEnduringGrowStrong@sh.itjust.works 16 points 18 hours ago (3 children)

I’ve not had good luck finding something that gives me the confidence to go about it

Now's a good time to make sure you have good backups.
Knowing you can fallback to your backups helps a lot with confidence.

[–] dan@upvote.au 7 points 16 hours ago* (last edited 16 hours ago)

In addition to backups, consider using snapshots if your file system supports it (ZFS, Btrfs, or LVM).

I use ZFS and have each of my Docker volumes in a separate ZFS dataset (similar to a Btrfs subvolume). This lets me snapshot each container independently. I take a snapshot before an upgrade. If the upgrade goes badly, I can instantly revert back to the point before I performed the upgrade.

[–] darkan15@lemmy.world 3 points 17 hours ago

Having the ability to shut down the main instance of an app and run a secondary instance from backups without much hassle is the best feeling ever, I recently updated from Nextcloud v26 to v31, and having the ability to just go back to a working version if anything was wrong saved me from so much stress.

[–] corsicanguppy@lemmy.ca -4 points 18 hours ago

fallback

That's the noun. For the verb, it's "fall back", with a space.

[–] CocaineShrimp@sh.itjust.works 6 points 19 hours ago (2 children)

I haven't gone through your specific case, but generally what I do when doing a major update with potentially breaking changes:

  • Read the upgrade guides, if they have them. Some devs will put them out if they know their users will encounter issues when upgrading. If they don't have an upgrade guide, there might be some in the change logs. Going from 1.17.1 to (assuming) 2.x.y, check the change logs at 2.0.0.
  • Backup everything. I'd recommend doing this on a regular basis anyway.
  • (If you're running it in a docker container) Setup a second instance, restore the backup, then run the upgrade. You'll be able to check to see if it breaks at all. If it works, you can just destroy the old one and use the new one
  • (if you're not running it in a container) with the backup, try upgrading. If it breaks, you should be able to uninstall & reinstall the old version, then restore the backup
[–] CocaineShrimp@sh.itjust.works 7 points 19 hours ago* (last edited 19 hours ago)

Looking through the docs n' stuff, this is what I found:

I wasn't able to find any additional instructions on how to update other than the expected generic steps (docker pull or pip install -r requirements.txt). So my guess at this point is that they have scripts built in to check the version and run upgrade scripts as needed

[–] darkan15@lemmy.world 2 points 18 hours ago

Yeah, these are pretty solid advice, would say that you should be safe with patch version updates, like from 1.17.1 to 1.17.4

Should be able to jump from 1.17.4 to 2.0.1 and from 2.0.1 to 2.1.3, etc. going straight to the last patch of the next version, but should go one by one minor version, paying close attention to those versions that have breaking changes in the release notes. And always backup and test before each version jump.

[–] CocaineShrimp@sh.itjust.works 1 points 19 hours ago

I haven't gone through your specific case, but generally what I do when doing a major update with potentially breaking changes:

  • Read the upgrade guides, if they have them. Some devs will put them out if they know their users will encounter issues when upgrading. If they don't have an upgrade guide, there might be some in the change logs. Going from 1.17.1 to (assuming) 2.x.y, check the change logs at 2.0.0.
  • Backup everything. I'd recommend doing this on a regular basis anyway.
  • (If you're running it in a docker container) Setup a second instance, restore the backup, then run the upgrade. You'll be able to check to see if it breaks at all. If it works, you can just destroy the old one and use the new one
  • (if you're not running it in a container) with the backup, try upgrading. If it breaks, you should be able to uninstall & reinstall the old version, then restore the backup