Upgrade from v25 to v35

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 25.0.9
    • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • apache2 2.4.58-1ubuntu8.15
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • replace me
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • replace me
  • When did this problem seem to first start?
    • always
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • replace me
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

Hello. I want to upgrade nextcloud 25.0.9 to 35.0.0 (latest stable). I’ve tried using the “backup” application, but while it is available for V25, it is not available for v35.

Appart from using “backup” does someone know a better solution to migrate from 25.0.9 to 35.0.0 in one shot, or at least without having to run all major versions in between upgrades (25->26->etc.->35) ?

Steps to replicate it (hint: details matter!):

  1. install v25, use it

  2. install “backup” app, make a backup

  3. try to restore that previously made backup on v35

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

root@machine:/var/www/html/nextcloud# sudo -u www-data php8.3 /var/www/html/nextcloud/occ app:install backup
Error: App "Backup" cannot be installed because it is not compatible with this version of the server.

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

none

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

none

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "scribe.ac-test.fr"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "sqlite3",
        "version": "35.0.1.1",
        "overwrite.cli.url": "https:\/\/scribe.ac-test.fr\/nextcloud",
        "installed": true
    }
}

Apps

The output of occ app:list (if possible).

Enabled:

  • activity: 8.0.0
  • app_api: 35.0.0
  • appstore: 2.0.0-dev.0
  • bruteforcesettings: 8.0.0
  • circles: 35.0.0
  • cloud_federation_api: 2.0.0-dev.0
  • comments: 2.0.0-dev.0
  • contactsinteraction: 2.0.0-dev.0
  • dashboard: 8.0.0-dev.0
  • dav: 2.0.0-dev.1
  • federatedfilesharing: 2.0.0-dev.1
  • federation: 2.0.0-dev.0
  • files: 3.0.0-dev.0
  • files_downloadlimit: 5.3.0
  • files_lock: 35.0.0
  • files_pdfviewer: 8.0.0
  • files_reminders: 2.0.0-dev.0
  • files_sharing: 2.0.0-dev.1
  • files_trashbin: 2.0.0-dev.0
  • files_versions: 2.0.0-dev.0
  • firstrunwizard: 8.0.0
  • logreader: 8.0.0
  • lookup_server_connector: 2.0.0-dev.0
  • nextcloud_announcements: 7.0.0
  • notifications: 8.0.0
  • oauth2: 2.0.0-dev.0
  • office: 1.1.0
  • password_policy: 7.0.0
  • photos: 8.0.0
  • privacy: 7.0.0
  • profile: 2.0.0-dev.0
  • provisioning_api: 2.0.0-dev.0
  • recommendations: 8.0.0
  • related_resources: 6.0.0
  • serverinfo: 7.0.0
  • settings: 2.0.0-dev.0
  • sharebymail: 2.0.0-dev.0
  • sharing: 1.0.4
  • support: 7.0.0
  • survey_client: 7.0.0
  • systemtags: 2.0.0-dev.0
  • text: 9.0.0
  • theming: 3.0.0-dev.0
  • twofactor_backupcodes: 2.0.0-dev.0
  • twofactor_totp: 17.1.0
  • updatenotification: 2.0.0-dev.0
  • user_status: 2.0.0-dev.0
  • viewer: 8.0.0
  • weather_status: 2.0.0-dev.0
  • webhook_listeners: 2.0.0-dev.0
  • workflowengine: 3.0.0-dev.0
    Disabled:
  • admin_audit: 2.0.0-dev.0
  • backup: 1.4.0
  • encryption: 3.0.0-dev.0
  • files_external: 2.0.0-dev.0
  • suspicious_login: 13.0.0
  • twofactor_nextcloud_notification: 9.0.0
  • user_ldap: 2.0.0-dev.0

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

An upgrade from 25 → 35 in one shot is not possible. The only way to upgrade is 25->26->etc.->35 or a fresh new install and then restore the Files in Data Directory and Calendar / Adressbook, etc from Backup

Beside of that. What have you done the last 3 years? Nextcloud 25 is EOL since October 31, 2023 !!! Running an EOL version exposed to the internet is strongly discouraged since unpatched vulnerabilities will remain unaddressed.

It is not enough to upgrade Nextcloud from 25 to 35 major-release by major-release.
You also will need to take care, whether a compatible PHP-version currently is installed - see

PHP musst support the currently installed Nextcloud-version as well as the next version to be installed.

In this forum you will find a lot of threads concerning this topic, forum-search should help you to find the relating guides.

The old Backup app has little to nothing to do with performing upgrades.

See the Admin Manual for all the ways of doing upgrades. There is no way, however, around needing to avoid major version bumps.

If your concern is PHP version compatibility, use SURY or similar to easily version switch. The forum has numerous posts on the topic.

If that ist true, there is no PHP version incompatibility with Nextcloud 35. Read: System requirements — Nextcloud 35 Administration Manual. PHP 8.5 is recommended but 8.4 and 8.3 still supported.

First of all, thank you all for your answers.

I’ve inherited from this situation. I’ve dozens of servers to upgrade, so I need to automate it in some way.

PHP version does not seem to be a problem. My servers all have PHP 7.4, 8.1 and 8.3. PHP 8.3 looks to be ok for Nextcloud 35.0.0. Upgrade PHP to 8.5 should be doable.

So the only, but big problem is to upgrade dozens of Nextcloud instances from 25 to 35 automatically.

And if it was not enough, I am desperately short on time to dig deep into the problem; I have about a million things on the go that all needed answers yesterday. And as Adelaar points out, it’s not wise to leave an unsupported version online; if one of them gets hacked, I’ll have even more work on my hands.

I skimmed the admin manual, I’ll dive deeper into it.

I searched the forum and got so many results, it’s not easy to sort through them all.

I’m open to any suggestions to upgrade, any proposals to help automate the process.

First of all, I’m afraid there’s no way to avoid going through all the versions if you want to make sure everything remains consistent after the upgrade or migration.

I’m no expert, but as I understand it, at a high level, Nextcloud can make changes to the database as part of updates, but not every update necessarily applies all the changes introduced in previous versions. In other words, if you skip versions, your database might be missing certain tables or schema changes that the newer version expects to be there.

This also means that, as a consequence, you can’t simply restore a backup of an older version into a freshly installed newer version, because the database then wouldn’t have gone through those migrations either. Or, put another way, backup and restore are only supported when using the same version.

I mean, there’s a CLI updater, so in theory, you could script something. Although I’d hesitate to recommend that. I’d still want to check that everything works after each version upgrade. And, of course, make a backup beforehand or take a VM snapshot, especially when you have to upgrade through so many versions.

Novice Alert! Take my suggestions with a grain of salt.

I had a similar situation recently trying to upgrade to v35 by updating my docker container directly, rather than using the web update utility. Wound up doing a completely new install.

Now that I’m on v.35 I was looking for a backup utility for the future but it seems those published in the app store are not compatible with the most recent version. You will probably need to upgrade in stages or do a clean install and restore, per the advice above.

In either case, I urge you to follow the procedure described here:

That said, I stumbled across this yesterday and thought I’d ask in the forum here for second opinions:

Let me know what y’all think!

Fortunately, all my NextCloud servers share an identical configuration. This means I can validate the upgrade on one server and then automate it across all the others. However, once I have validated the upgrade, I would only want to deploy the files required for the upgrade, rather than the 9 full Nextcloud versions. I mean, only retrieving the PHP files needed to upgrade the database, the executables to run, and the libraries they require.

The main reason I don’t want to download 10 full Nextcloud archives is a bandwidth issue. We are talking about remote islands in the Indian Ocean…

I’d say that probably wouldn’t really help in this situation either. I mean, don’t get me wrong, backups are important, and there are plenty of guides, tools and prebuilt scripts out there to make them easier or automate them. But you still have to keep your Nextcloud instances up to date, and you still can’t skip versions.

Or, to put it simply: If you want to make sure everything stays consistent, you should only restore a backup to the same Nextcloud version it was taken from.

Maybe this is of any help: Upgrade via built-in updater — Nextcloud 35 Administration Manual

If I understand it correctly, you could serve the ZIP files from a local HTTP server and have the updater use that via the --uri argument.

EDIT: I’m not sure if this was already supported in version 25, though. At least I can’t find anything about it in the version 25 documentation… Upgrade via built-in updater — Nextcloud latest Administration Manual latest documentation