Nextcloud update stuck at "Create backup"

Hello there, for the past two years now, almost every time I try and update Nextcloud (online), it gets stuck at “create backup”. This leads to backups piling up, etc. Eventually I usually manage to update it, but it’s a total hit & miss process / time consuming. Can you please advise on (first thing that comes to mind) what I should tell my webhosting provider. Or do, in general. Thanks.

  • Nextcloud Server version (e.g., 29.x.x):

    • Nextcloud Hub 9 (30.0.5)
    • Shared Webhosting (Manitu, Germany)
  • PHP version (e.g, 8.3):

  • 8.2

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

  1. Administration Settings
  2. Open Updater
  3. Start Update

Log entries

{"reqId":"Z7Nv3TidyHRHqZnvtNamQwAAAJg","level":3,"time":"2025-02-17T17:20:30+00:00","remoteAddr":"2003:fc:8f1c:12dc:fe45:6121:5977:acfc","user":"rawimage2","app":"PHP","method":"GET","url":"/index.php/apps/updatenotification/credentials","message":"chmod(): Operation not permitted at /home/sites/site100017949/web/cloud.optimumediting.com/lib/private/Log/File.php#55","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0","version":"30.0.5.1","data":{"app":"PHP"},"id":"67b3701064e1a"}

Web Browser

Firefox 134.0.2 (64-bit)

config.php file

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxx',
  'secret' => 'xxxx',
  'trusted_domains' => 
  array (
    0 => 'cloud.optimumediting.com',
  ),
  'datadirectory' => '/home/sites/site100017949/web/cloud.optimumediting.com//data',
  'dbtype' => 'mysql',
  'version' => '30.0.5.1',
  'overwrite.cli.url' => 'http://cloud.optimumediting.com',
  'dbname' => 'xxxxxx',
  'dbhost' => 'xxxxx.manitu.net',
  'dbport' => '',
  'dbtableprefix' => 'nc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxxxx',
  'installed' => true,
  'instanceid' => 'oci3wluq61zn',
  'default_language' => 'de',
  'default_locale' => 'de_DE',
  'default_phone_region' => 'DE',
  'integrity.check.disabled' => 'true',
  'trashbin_retention_obligation' => 'auto, 30',
  'version_retention_obligation' => 'auto, 30',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'log_type' => 'file',
  'logfile.local' => '/dev/null',
  'localstorage.umask' => '0007',
  'enable_previews' => 'false',
  'skeletondirectory' => '',
  'updater.secret' => 'xxxxxxxx',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

Raise a ticket at your hoster

Additionally, you can disable the Updater backup. See Updater: Troubleshooting in the Admin Manual. You can also review the updater.log.

The access rights for PHP are probably not correct?

this is known for shared webhosting. every backup is stored in the backup folder and needs to be deleted manually. if its not deleted webspace is “used-up” and further backups are prevented, thus backup for upgrade fails.

  • access your Manitu webspace
  • navigate to your nextcloud directory
  • find backup directory /path/to/nextcloud/data/updater-***/backups
  • set permission for backup directory (see date *** updater-***)
  • delete old backup directory/directories
  • if necessary remove file .step from nextcloud update directory
  • continue backup/upgrade

see also:

as @rakekniven suggested, contact support, they are always friendly and helpful

@jtr :+1: where were you when I needed this… ? is there any method for webupdater?

php /path/to/nextcloud/updater/updater.phar --no-backup --no-interaction

No. Unfortunately not. There is only a “hack” by using the OCC Web app…

1 Like

According to Manitu’s website, all webhosting plans have SSH access, so it should be possible to access the webspace directly via SSH and start the CLI-updater from there with the --no-backup option, and if necessary also delete old backups manually.

The command would then look something like this…

Example with PHP 8.3:

php8.3 /path/to/nextcloud/updater/updater.phar --no-backup --no-interaction
1 Like

many thanks everyone for their suggestions and help.

so, I followed scubamuc’s directions, and deleted old backups and .step. I’m kind of stuck at “set permission” (except for the “Berechtigungen” step)…

I seem to understand that I need to make use of SSH (bb77) to launch a command and disable the backup option: correct?

Am I to do this at " SSH Benutzer > SSH-Benutzer hinzufügen"? I’m kind of lost as to a) public key, b) what will happen afterwards, that is, will I find a Linux-like terminal where I can enter ```
php8.2 /path/to/nextcloud/updater/updater.phar --no-backup --no-interaction?

and how I find out what my “path/to/nextcloud” is?

or can I skip the SSH Benutzer altogether and install the OCC Web app - and do it there? Again, if I got that right :smile:

I’m not sure if you can actually run the updater.phar from the occ web app, afaik it’s only meant to run occ commands.

If it doesn’t work, you could try the web updater again. Now that you’ve deleted the .step files and the old backups, it will probably work.

In the long run, however, it would probably be best to learn how SSH works and then use that for future updates.

2 Likes

got it :smile: I’ll get in touch with the Manitu helpdesk then, and see if it’s safe for me to learn SSH or they’d rather do it for me. I’ll report back on that here as soon as there’s been some development. Thanks again!

You cannot. It was a brain fart from my end to suggest the OCC web and the updater.phar It would be nice though if we could add those parameters to an OCC update command (like the -no-backup --no-interaction)
As an “easy” workaround, we could add an “advanced upgrade config option” where you can type in custom parameters, but with a warning. The updater would need to stop processing if it fails to recognize any of the parameters.

1 Like

You can check the manitu wiki for more information:
https://wiki.manitu.de/index.php/Einrichtung_SSH-Benutzer
https://wiki.manitu.de/index.php?title=Wartungsaufgaben_bei_Nextcloud

I’m hosting my Nextcloud also at manitu and it works.

2 Likes

Well if you have SSH access, then it is definately the right solution.

1 Like

you can change permissions without ssh for those directories here:

1 Like

In the field “Verzeichnis” chose the folder where you have installed your Nextcloud, e.g. “/web/nextcloud/”
In the field “Besitzer” select your SSH account that you have created before.
Let the tool make the right changes. When it’s finished you can login with your SSH user and can follow the steps for the update.
Important: When your are done, go back to the tool and set the rights back to the default values.

1 Like

thanks again everyone. I’ve been trying to apply the SSH solution, to no avail. I can’t get through the initial steps - and now I have unfortunately no time to report on it / try again…

I’ll try again, of course, though I have a question: can’t the Nextcloud developers solve the issue once and for all? for all the love I have for open-source software - and much as I’d love to contribute, it does get tiring for people like me who’re IT-illiterate…just a thought

Which problem?

The backups piling up / consuming space?

  • There is already a background job that cleans those up. Only the last three are kept around.
  • If you don’t want backups to be created at all in your environment, the --no-backup accomplishes that. I guess you may be asking for a config directive that makes this semi-permanent rather than having to use the CLI-mode? If that’s of interest, I suggest you upvote the enhancement Issue for it.
  • The updatedirectory config value can be used to have the Updater use a different work directory